1(function ($) { 2 3 /** 4 * @param $scope The Widget wrapper element as a jQuery element 5 * @param $ The jQuery alias 6 */ 7 // Make sure you run this code under Elementor. 8 $(window).on('elementor/frontend/init', () => { 9 elementorFrontend.hooks.addAction('frontend/element_ready/animated-hamburger-for-elementor.default', ($scope, $) => { 10 if (typeof elementor !== 'undefined') { 11 elementor.channels.editor.on('clicche:hamburger:preview', function (event, id) { 12 debugger 13 $('.hamburger').addClass('is-active'); 14 setTimeout(() => $('.hamburger').removeClass('is-active'), 2000); 15 }); 16 } 17 18 let timeS = ""; 19 const hamburger = $scope.find('.hamburger-block'); 20 const target_type = hamburger.attr('data-target-type'); 21 22 if (target_type == 'popup') { 23 const target_id = hamburger.attr('data-target'); 24 25 $(document).on('elementor/popup/hide', (event, id, instance) => { 26 if (id == target_id) { 27 timeS = event.timeStamp 28 hamburger.find('.hamburger').removeClass('is-active'); 29 setTimeout(() => $('body').removeClass('dialog-prevent-scroll'), 200); 30 } 31 }); 32 33 $(document).on('elementor/popup/show', (event, id, instance) => { 34 if (id == target_id && (event.timeStamp - timeS) > 200) { 35 timeS = event.timeStamp 36 hamburger.find('.hamburger').addClass('is-active'); 37 } 38 }); 39 } 40 }); 41 }); 42 43 44})(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.