1( function( $ ) { 2 3 /** 4 * BUTTON BEHAVIOUR 5 */ 6 $( window ).on( 'elementor/frontend/init', function() { 7 8 elementorFrontend.hooks.addAction( 'frontend/element_ready/fox_btn.default', function( $scope, $ ) { 9 10 $( document ).on( 'click', '.btn-popup', function( e ) { 11 e.preventDefault() 12 13 var self = $( this ), 14 popup_selector = self.data( 'popup' ) 15 16 if ( ! $( popup_selector ).length ) { 17 return 18 } 19 20 $( 'html' ).addClass( 'openning-popup' ) 21 $( popup_selector ).addClass( 'showing' ) 22 23 }); 24 25 $( document ).on( 'click', '.el-popup-overlay', function( e ) { 26 e.preventDefault() 27 28 var self = $( this ), 29 the_popup = self.prev( '.el-popup' ) 30 31 if ( ! $( the_popup ).length ) { 32 return 33 } 34 35 $( 'html' ).removeClass( 'openning-popup' ) 36 the_popup.removeClass( 'showing' ) 37 38 }); 39 40 $( document ).on( 'click', '.popup-close', function( e ) { 41 e.preventDefault() 42 43 var self = $( this ), 44 the_popup = self.closest( '.el-popup' ) 45 46 if ( ! $( the_popup ).length ) { 47 return 48 } 49 50 $( 'html' ).removeClass( 'openning-popup' ) 51 the_popup.removeClass( 'showing' ) 52 53 }); 54 55 }); 56 57 }) 58 59 /** 60 * VERTICAL NAV 61 */ 62 63 $( document ).on( 'click', '.vnav li.menu-item-has-children > a', function( e ) { 64 e.preventDefault() 65 var self = $( this ), 66 li = self.parent(), 67 ul = li.parent() 68 69 // why?? 70 if ( ! li.find('>ul').length ) { 71 return 72 } 73 74 // if we're clicking to the active one 75 if ( li.hasClass( 'active' ) ) { 76 77 li.find( '>ul' ).slideUp( 'fast', 'linear', function() { 78 li.removeClass( 'active' ) 79 }) 80 81 // otherwise 82 } else { 83 84 ul.find( '>li' ).each( function() { 85 var ul_li = $( this ) 86 if ( ul_li.hasClass( 'active' ) ) { 87 ul_li.find( '>ul' ).slideUp( 'fast', 'linear', function() { 88 ul_li.removeClass( 'active' ); 89 }); 90 } 91 }) 92 93 li.find( '>ul' ).slideDown( 'fast', 'linear', function(){ 94 li.addClass( 'active' ) 95 }) 96 97 98 } 99 }); 100 101 $( window ).on( 'elementor/frontend/init', function() { 102 //hook name is 'frontend/element_ready/{widget-name}.{skin} - i dont know how skins work yet, so for now presume it will 103 //always be 'default', so for example 'frontend/element_ready/slick-slider.default' 104 //$scope is a jquery wrapped parent element 105 106 elementorFrontend.hooks.addAction( 'frontend/element_ready/post-masonry.default', function( $scope, $ ) { 107 WITHEMES.reInit(); 108 }); 109 110 elementorFrontend.hooks.addAction( 'frontend/element_ready/post-standard.default', function( $scope, $ ) { 111 WITHEMES.reInit(); 112 }); 113 114 elementorFrontend.hooks.addAction( 'frontend/element_ready/post-newspaper.default', function( $scope, $ ) { 115 WITHEMES.reInit(); 116 }); 117 118 elementorFrontend.hooks.addAction( 'frontend/element_ready/post-slider.default', function( $scope, $ ) { 119 WITHEMES.reInit(); 120 }); 121 122 elementorFrontend.hooks.addAction( 'frontend/element_ready/post-group-1.default', function( $scope, $ ) { 123 WITHEMES.reInit(); 124 }); 125 126 elementorFrontend.hooks.addAction( 'frontend/element_ready/post-group-2.default', function( $scope, $ ) { 127 WITHEMES.reInit(); 128 }); 129 130 });
131 132} )( 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.