1jQuery(document).ready(function ($) { 2 3 4 $.fn.mt_init = function () { 5 let target = $('.mt-mobile-menu-widget mt-input'); 6 $.fn.mt_setDirtyness(target); 7 $.fn.mt_toggle(); 8 }; 9 10 $.fn.mt_setDirtyness = function (target) { 11 if (target.value && target.value.length > 0) { 12 $('.mt-mobile-menu-widget').addClass('mt-input-dirty'); 13 } else { 14 $('.mt-mobile-menu-widget').removeClass('mt-input-dirty'); 15 } 16 } 17 18 $.fn.mt_toggle = function () { 19 if ($(window).scrollTop() != 0) { 20 $('.mt-mobile-menu-widget').addClass('show'); 21 } else { 22 $('.mt-mobile-menu-widget').removeClass('show'); 23 } 24 } 25 26 $.fn.mt_init(); 27 28 $('.mt-mobile-menu-widget .mt-menu-button').on('click', 29 function () { 30 $('.mt-mobile-menu-overlay').fadeToggle('fast', 'linear'); 31 $('body').addClass('mt-noscroll'); 32 $('.mt-mobile-menu-overlay .sf-accordion').addClass('sf-expanded').removeClass('sf-hidden'); 33 }); 34 35 $('.mt-mobile-menu-overlay').on('dblclick', 36 function () { 37 $('.mt-mobile-menu-overlay').fadeToggle('fast', 'linear'); 38 $('body').removeClass('mt-noscroll'); 39 }); 40 41 $('.mt-mobile-menu-widget .mt-input').keyup(function (event) { 42 43 $.fn.mt_setDirtyness(event.target); 44 }); 45 46 $('.mt-mobile-menu-widget .mt-clear-icon').on('click', 47 function () { 48 $('.mt-mobile-menu-widget .mt-input').val('').keyup(); 49 }); 50 51 $('.mt-mobile-menu-overlay .mt-dismiss-button.mt-button').on('click', 52 function () { 53 $('.mt-mobile-menu-overlay').fadeToggle('fast', 'linear'); 54 $('body').removeClass('mt-noscroll'); 55 }); 56 57 $(window).scroll(function () { 58 $.fn.mt_toggle(); 59 }); 60});
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.