1jQuery(function($){ 2 let isMobile = false; 3 4 function handleShopNav(){ 5 $('.page-nav-title').click(function(){ 6 $(this).toggleClass('open'); 7 $('.page-menu-container').fadeToggle(); 8 }) 9 } 10 11 function handleSubs() { 12 handleShopNav(); 13 const menu = $('.page-menu') 14 const subs = menu.find('.menu-item-has-children') 15 subs.each(function(){ 16 let _ = $(this) 17 let a = _.find('> a') 18 a.before('<div class="menu-drop" />') 19 let drop = _.find('> .menu-drop') 20 a.appendTo(drop) 21 a.after('<svg class="icon menu-drop-trigger"><use xlink:href="#down-angle" /></svg>') 22 let trigger = drop.find('.menu-drop-trigger') 23 trigger.click(function(){ 24 _.toggleClass('show') 25 }) 26 }) 27 } 28 29 if (!isMobile && $(window).width() <= 768){ 30 // do something here 31 isMobile = true; 32 if ($('.page-nav').hasClass('show-mobile')) { 33 handleSubs(); 34 } 35 } 36 37 $(window).resize(function(){ 38 if (!isMobile && $(window).width() <= 768){ 39 // do something here 40 isMobile = true; 41 if ($('.page-nav').hasClass('show-mobile')) { 42 handleSubs(); 43 } 44 } 45 }); 46})
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.