1$(function() { 2 3 // Hide Header on on scroll down 4 var didScroll; 5 var lastScrollTop = 0; 6 var delta = 1; 7 var navbarHeight = $('.header-section').outerHeight(); 8 9 $(window).scroll(function(event){ 10 didScroll = true; 11 }); 12 13 setInterval(function() { 14 if (didScroll) { 15 hasScrolled(); 16 didScroll = false; 17 } 18 }, 250); 19 20 function hasScrolled() { 21 var st = $(this).scrollTop(); 22 23 // Make sure they scroll more than delta 24 if(Math.abs(lastScrollTop - st) <= delta) 25 return; 26 27 // If they scrolled down and are past the navbar, add class .nav-up. 28 // This is necessary so you never see what is "behind" the navbar. 29 if (st > lastScrollTop && st > navbarHeight){ 30 // Scroll Down 31 $('.header-section').removeClass('down').addClass('up'); 32 33 } else { 34 if(st + $(window).height() < $(document).height()) { 35 $('.header-section').removeClass('up').addClass('down'); 36 $('.logo_mobile').removeClass('hide'); 37 } 38 } 39 lastScrollTop = st; 40 } 41 }); 42 43 $(function () { 44 // Verifica se il corpo non ha né la classe "contact" né la classe "gallery_page" 45 if (!$('body').hasClass('contact') && !$('body').hasClass('gallery_page')) { 46 $('.header-section').addClass('transparent'); 47 $('.nav-bar').addClass('transparent'); 48 } 49 }); 50
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.