1 2// Hamburger Nav 3$(function () { 4 $('.l-header').append('<p class="p-toggle"><span class="hamburger-icon"></span></p>'); 5 $(".p-toggle").click(function () { 6 $(".l-global-nav").fadeToggle(300); 7 $(".l-global-nav").toggleClass('active'); 8 $(".hamburger-icon").toggleClass("close"); 9 $(this).toggleClass("is-fixed"); 10 return false; 11 }); 12 $(".l-global-nav li a").click(function () { 13 const href = $(this).attr("href"); 14 if (href && href.indexOf("#") !== -1) { 15 $(".l-global-nav").fadeOut(300); 16 $(".l-global-nav").removeClass('active'); 17 $(".hamburger-icon").removeClass("close"); 18 $(".p-toggle").removeClass("is-fixed"); 19 } 20 }); 21}); 22 23// Clone Nav 24$(function() { 25 var $win = $(window), 26 $cloneNav = $('.l-header').clone().addClass('clone-nav').appendTo('body'), 27 showClass = 'is-show', 28 threshold = 500; 29 function checkScroll() { 30 var value = $win.scrollTop(); 31 if (value > threshold) { 32 $cloneNav.addClass(showClass); 33 } else { 34 $cloneNav.removeClass(showClass); 35 } 36 } 37 $win.on('scroll', checkScroll); 38 $win.on('load', function() { 39 setTimeout(checkScroll, 100); 40 }); 41 checkScroll(); 42}); 43 44// Scroll 45$(function () { 46 $('.js-scroll, .js-pagelink li a, .p-global-nav li a').on('click', function () { 47 var href = $(this).attr('href'); 48 if (!href || href.charAt(0) !== '#') { 49 return; 50 } 51 var adjust = 0; 52 var speed = 1000; 53 var target = $(href === '#' ? 'html' : href); 54 var position = target.offset().top + adjust; 55 $('html, body').animate( 56 { scrollTop: position }, 57 speed, 58 'easeInOutCubic' 59 ); 60 return false; 61 }); 62}); 63 64// Slick 65$(function () { 66 $('.js-gallery-slider').slick({ 67 swipe: false, 68 autoplay: true, 69 autoplaySpeed: 6000, 70 dots: true, 71 arrows: false, 72 pauseOnHover: false, 73 pauseOnFocus: false, 74 }); 75}); 76 77// layerBoard 78$(function () { 79 if (window.matchMedia( "(max-width: 768px)" ).matches) { 80 $('.js-layerboard').layerBoard({ 81 delayTime: 100, 82 fadeTime : 300, 83 alpha : 1.0, 84 limitMin : 0, 85 easing: 'swing', 86 limitCookie : 0 87 }); 88 } 89}) 90 91// Gotop 92$(function () { 93 $('body').append('<p class="p-pagetop"><span>↑</span></p>'); 94 var topBtn = $('.p-pagetop'); 95 topBtn.hide(); 96 $(window).scroll(function () { 97 if ($(this).scrollTop() > 200) { 98 topBtn.fadeIn(); 99 } else { 100 topBtn.fadeOut(); 101 } 102 }); 103 topBtn.click(function () { 104 $('html, body').animate( 105 { scrollTop: 0 }, 106 1000, 107 'easeInOutCubic' 108 ); 109 return false; 110 }); 111});
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.