1;(function($) { 2 3 $(document).ready(function() { 4 5 //mobile-wrap 6 const mobile_nav_open = $('.mobile-nav-icon'); 7 const mobile_sidebar = $('.mobile-sidebar'); 8 const mobile_nav_close = $('.menu-close'); 9 10 mobile_nav_open.on('click', function(){ 11 mobile_sidebar.addClass('mobile-menu-active'); 12 }); 13 14 mobile_nav_close.on('click', function(){ 15 mobile_sidebar.removeClass('mobile-menu-active'); 16 }); 17 18 19 20 //mobile-menus 21 $('.mobile-nav a').each(function(){ 22 var href = $(this).attr('href'); 23 if(href = '#'){ 24 $(this).addClass('hash-nav') 25 }else { 26 $(this).removeClass('hash-nav') 27 } 28 }); 29 30 31 //mobile-menus-markup 32 $.fn.menumarker = function(options){ 33 mobile_menu = $(this), 34 settings = $.extend({ 35 format: "dropdown", 36 sticky: false 37 }, options); 38 39 40 return this.each(function(){ 41 mobile_menu.find('li ul').parent().addClass('has-sub'); 42 var multiTg = function(){ 43 mobile_menu.find('.hash-nav').parent().addClass('hash-has-sub'); 44 mobile_menu.find(".has-sub").prepend('<span class="submenu-button"><em></em></span>'); 45 mobile_menu.find('.submenu-button').on('click', function(){ 46 $(this).toggleClass('submenu-opened'); 47 if ($(this).siblings('ul').hasClass('open-sub')) { 48 $(this).siblings('ul').removeClass('open-sub').hide('fadeIn'); 49 $(this).siblings('ul').hide('fadeIn'); 50 } else { 51 $(this).siblings('ul').addClass('open-sub').hide('fadeIn'); 52 $(this).siblings('ul').slideToggle().show('fadeIn'); 53 } 54 }); 55 }; 56 57 if (settings.format === 'multitoggle') multiTg(); 58 else mobile_menu.addClass('dropdown'); 59 if (settings.sticky === true) mobile_menu.css('position', 'fixed'); 60 var resizeFix = function () { 61 if ($(window).width() > 991) { 62 mobile_menu.find('ul').show('fadeIn'); 63 mobile_menu.find('ul.sub-menu').hide('fadeIn'); 64 } 65 }; 66 resizeFix(); 67 return $(window).on('resize', resizeFix); 68 69 }) 70 71 } 72 73 74 $('.mobile-nav').menumarker({ 75 format: "multitoggle" 76 }); 77 78 79 }); 80 81 82 83 84 85})(jQuery); 86
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.