1$(window).scroll(function() { 2 var body = $("body"); 3 if ($(this).scrollTop() > 100) { 4 body.addClass("cd-scroll"); 5 } else { 6 body.removeClass("cd-scroll"); 7 } 8}); 9 10function toggleExpand( event ) { 11 event.preventDefault(); 12 13 var clickedEntry = event.target; 14 if (!(event.target instanceof HTMLAnchorElement)) { 15 clickedEntry = event.target.parentElement; 16 } 17 18 $(clickedEntry).toggleClass("open"); 19 $(clickedEntry.nextElementSibling).children("ul").slideToggle(); 20 21 $(clickedEntry.parentElement).siblings().each(function() { 22 $(this).children("a").removeClass("open"); 23 $(this).children("div").each(function() { 24 $(this).children("ul").each(function () { 25 if ($(this).is(":visible")) { 26 $(this).slideToggle(); 27 } 28 }) 29 }); 30 }); 31} 32 33function closeAllDropDowns() { 34 $(".cd-singledropdownmenu > .cd-menu-level-1").find(".cd-menu-expand").each(function() { 35 if ($(this).hasClass("open")) { 36 $(this).toggleClass("open"); 37 $(this.nextElementSibling).children("ul").slideToggle(); 38 } 39 }); 40} 41 42$(".cd-singledropdownmenu").find(".cd-menu-expand").click(toggleExpand); 43 44function toggleMobileMenu(event) { 45 event.stopPropagation(); 46 47 document.body.classList.toggle('cd-mobile-menu-open'); 48 49 // if ($(document.body).hasClass('cd-mobile-menu-open')) { 50 // var y = window.scrollY; 51 // document.body.style.top = '-' + y + 'px'; 52 // document.body.style.position = 'fixed'; 53 // } else { 54 // const scrollY = document.body.style.top; 55 // document.body.style.position = ''; 56 // document.body.style.top = ''; 57 // window.scrollTo(0, parseInt(scrollY || '0') * -1); 58 // } 59 60 var navIcons = document.getElementsByClassName("nav-icon");
61 Object.keys(navIcons).forEach(function (key) { 62 navIcons[key].classList.toggle('open'); 63 }); 64 65 document.getElementsByClassName("cd-mobile-menu-level-1")[0].classList.toggle('open'); 66 $( ".cd-mobile-menu-background" ).toggle(); 67} 68 69$(".cd-mobile-menu").find(".cd-menu-expand").click(function( event ) { 70 event.preventDefault(); 71 event.stopPropagation(); 72 73 var clickedEntry = event.target; 74 if (!(event.target instanceof HTMLAnchorElement)) { 75 clickedEntry = event.target.parentElement; 76 } 77 78 $(clickedEntry).toggleClass("active"); 79 $(clickedEntry.nextElementSibling).children("ul").slideToggle(); 80 81 $(clickedEntry.parentElement).siblings().each(function() { 82 $(this).children("a").removeClass("active"); 83 $(this).children("div").each(function() { 84 $(this).children("ul").each(function () { 85 if ($(this).is(":visible")) { 86 $(this).slideToggle(); 87 } 88 }) 89 }); 90 }); 91}); 92 93$(document).click(function(event) { 94 if ($(document.body).hasClass('cd-mobile-menu-open') && event.target.tagName.toLowerCase() === 'a') { 95 toggleMobileMenu(event); 96 } 97}); 98function topFunction() { 99 $('html, body').animate({scrollTop: 0}, 1200); 100}
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.