1jQuery(function($){ 2 function mobileNav() { 3 let outer = $('.mobile-nav-outer'); 4 let outerBG = $('#mobile_nav_bg'); 5 $('#colophon').append(outer); 6 $('#colophon').append(outerBG); 7 8 var triggerOpen = $('.mobile-nav-trigger-open'); 9 var triggerClose = $('.mobile-nav-trigger-close, #mobile_nav_bg'); 10 triggerOpen.click(function(){ 11 $('#mobile_nav_bg').stop().fadeIn(300, function(){ 12 $('#mobile_nav_wrap').addClass('toggled'); 13 $('.mobile-nav-outer').stop().animate({ 14 right: 0 15 }, 300); 16 scaleBgImages(); 17 }) 18 }); 19 triggerClose.click(function(){ 20 $('.mobile-nav-outer').stop().animate({ 21 right: '-500px' 22 }, 300, function(){ 23 $('#mobile_nav_wrap').removeClass('toggled'); 24 $('#mobile_nav_bg').fadeOut(300); 25 }); 26 }); 27 28 handleSubs(); 29 } 30 31 function handleSubs() { 32 const menu = $('#mobile_menu') 33 const subs = menu.find('.menu-item-has-children') 34 subs.each(function(){ 35 let _ = $(this) 36 let a = _.find('> a') 37 a.before('<div class="menu-drop" />') 38 let drop = _.find('> .menu-drop') 39 a.appendTo(drop) 40 a.after('<svg class="icon menu-drop-trigger"><use xlink:href="#down-angle" /></svg>') 41 let trigger = drop.find('.menu-drop-trigger') 42 trigger.click(function(){ 43 _.toggleClass('show') 44 }) 45 }) 46 } 47 48 function scaleBgImages() { 49 var bgs = $('*[data-bgratio]'); 50 bgs.each(function(){ 51 var _ = $(this); 52 var w = _.width(); 53 var r = _.data('bgratio'); 54 _.stop().height(w * r); 55 $(window).resize(function(){ 56 setTimeout(function(){ 57 w = _.stop().width(); 58 }, 500); 59 setTimeout(function(){ 60 _.stop().height(w * r); 61 },600); 62 }); 63 }); 64 } 65 66 mobileNav(); 67});
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.