1( 2 function( $ ) { 3 'use strict'; 4 5 var NussAccordionHandler = function( $scope, $ ) { 6 var $element = $scope.find( '.nuss-accordion' ); 7 var settings = $scope.data( 'settings' ); 8 9 // Do it only on front-end. 10 if ( settings && '1' === settings.active_first_item ) { 11 $element.children( '.accordion-section:first-child' ).children( '.accordion-content' ).css( 'display', 'block' ); 12 } 13 14 $element.on( 'click', '.accordion-header', function( e ) { 15 e = e || window.event; 16 e.preventDefault(); 17 e.stopPropagation(); 18 19 var section = $( this ).parent( '.accordion-section' ); 20 if ( section.hasClass( 'active' ) ) { 21 section.removeClass( 'active' ); 22 section.children( '.accordion-content' ).slideUp( 300 ); 23 } else { 24 var parent = $( this ).parents( '.nuss-accordion' ).first(); 25 if ( ! parent.data( 'multi-open' ) ) { 26 parent.children( '.active' ) 27 .removeClass( 'active' ) 28 .children( '.accordion-content' ) 29 .slideUp( 300 ); 30 } 31 section.addClass( 'active' ); 32 section.children( '.accordion-content' ).slideDown( 300 ); 33 } 34 } ); 35 }; 36 37 $( window ).on( 'elementor/frontend/init', function() { 38 elementorFrontend.hooks.addAction( 'frontend/element_ready/nuss-accordion.default', NussAccordionH
38andler ); 39 } ); 40 } 41)( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.