1(function ($) { 2 "use strict"; 3 4 jQuery(document).ready(function ($) { 5 function togglerAppend(el) { 6 $(el).each(function () { 7 $(this).before("<button class='menu-toggler'><span class='menu-toggler-icon'></span></button>"); 8 }) 9 } 10 11 $('.ekit-menu-init').smartmenus({ 12 mainMenuSubOffsetX: -1, 13 subMenusSubOffsetX: 0, 14 subMenusSubOffsetY: 0, 15 collapsibleShowFunction: function ($ul, complete) { $ul.slideDown(600, 'easeOutCubic', complete); }, 16 collapsibleHideFunction: function ($ul, complete) { $ul.slideUp(600, 'easeOutCubic', complete); } 17 }); 18 19 $('#main-menu').bind({ 20 'show.smapi': function (e, menu) { 21 $(menu).removeClass('hide-animation').addClass('show-animation'); 22 }, 23 'hide.smapi': function (e, menu) { 24 $(menu).removeClass('show-animation').addClass('hide-animation'); 25 } 26 }).on('animationend webkitAnimationEnd oanimationend MSAnimationEnd', 'ul', function (e) { 27 $(this).removeClass('show-animation hide-animation'); 28 e.stopPropagation(); 29 }); 30 31 /* ----------------------------------------------------------- */ 32 /* Mobile Menu 33 /* ----------------------------------------------------------- */ 34 $('.ekit-menu-container').each(function (__, e) { 35 $(e).after('<div class="ekit-menu-overlay"></div>'); 36 }); 37 38 togglerAppend($('.ekit-menu-container')) 39 40 function noScroller(el) { 41 if ($(el).parents('body').hasClass('no-scroller')) { 42 $(el).parents('body').removeClass('no-scroller') 43 } else { 44 $(el).parents('body').addClass('no-scroller') 45 } 46 } 47 48 if ($('.ekit-menu-container').length > 0) { 49 var parent = $('.ekit-menu-container').parent(); 50 $(parent).find('.menu-toggler').on('click', function (e) { 51 e.preventDefault(); 52 if (!$(this).parent().find('.ekit-menu-container').hasClass('active')) { 53 $(this).parent().find('.ekit-menu-container').addClass('active') 54 } 55 if (!$(this).parent().find('.ekit-menu-overlay').hasClass('active')) { 56 $(this).parent().find('.ekit-menu-overlay').addClass('active') 57 } 58 noScroller($(this)) 59 }) 60 $(parent).find('.menu-close').on('click', function (e) { 61 e.preventDefault(); 62 if ($(this).parents().find('.ekit-menu-container').hasClass('active')) { 63 $(this).parents().find('.ekit-menu-container').removeClass('active') 64 } 65 if ($(this).parents().find('.ekit-menu-overlay').hasClass('active')) { 66 $(this).parents().find('.ekit-menu-overlay').removeClass('active') 67 } 68 noScroller($(this)) 69 }) 70 $(parent).find('.ekit-menu-overlay').on('click', function () { 71 if ($(this).parent().find('.ekit-menu-container').hasClass('active')) { 72 $(this).parent().find('.ekit-menu-container').removeClass('active') 73 } 74 if ($(this).hasClass('active')) { 75 $(this).removeClass('active') 76 } 77 noScroller($(this)) 78 }) 79 } 80 81 }); 82 83})(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.