1$(document).ready(function () { 2 $(document).on("scroll", onScroll); 3 4 //smoothscroll 5 $('#gmph-scroll-down a[href^="#"]').on('click', function (e) { 6 e.preventDefault(); 7 $(document).off("scroll"); 8 9 $('#gmph-scroll-down a').each(function () { 10 $(this).removeClass('active'); 11 }) 12 $(this).addClass('active'); 13 14 var target = this.hash, 15 menu = target; 16 $target = $(target); 17 $('html, body').stop().animate({ 18 'scrollTop': $target.offset().top 19 }, 500, 'swing', function () { 20 window.location.hash = target; 21 $(document).on("scroll", onScroll); 22 }); 23 }); 24}); 25 26$(document).ready(function () { 27 $(document).on("scroll", onScroll); 28 29 //smoothscroll 30 $('#gmph-nav-menu a[href^="#"]').on('click', function (e) { 31 e.preventDefault(); 32 $(document).off("scroll"); 33 34 $('#gmph-nav-menu a').each(function () { 35 $(this).removeClass('active'); 36 $(this).attr('aria-current','false'); 37 }) 38 $(this).addClass('active'); 39 $(this).attr('aria-current','true'); 40 41 var target = this.hash, 42 menu = target; 43 $target = $(target); 44 $('html, body').stop().animate({'scrollTop': $target.offset().top}, 500, 'swing', function () { 45 window.location.hash = target; 46 $(document).on("scroll", onScroll); 47 }); 48 }); 49}); 50 51/* 52var offset = $(':target').offset(); 53var scrollto = offset.top - 60; // minus fixed header height 54$('html, body').animate({scrollTop:scrollto}, 0); 55*/ 56 57function onScroll(event) { 58 var scrollPos = $(document).scrollTop(); 59 $('#gmph-nav-menu a').each(function () { 60 var currLink = $(this); 61 var refElement = $(currLink.attr("href")); 62 if (scrollPos > ($('.sub-footer').position().top - $(window).height())) { 63 //$('#gmph-nav-wrapper').addClass("gmph-nav-hide"); 64 console.log('1'); 65 } 66 else if (($('#gmph-intro-wrapper').position().top - 2) < scrollPos) { 67 //$('#gmph-nav-wrapper').addClass("gmph-nav-hide"); 68 //$('#gmph-nav-wrapper').removeClass("gmph-nav-hide"); 69 console.log('2'); 70 } 71 else { 72 //$('#gmph-nav-wrapper').addClass("gmph-nav-hide"); 73 console.log('3'); 74 } 75 if ((refElement.position().top - 53) <= scrollPos && refElement.position().top + refElement.height() > scrollPos) { 76 $('#gmph-nav-menu ul li a').removeClass("active"); 77 currLink.addClass("active"); 78 } 79 else if (scrollPos > ($('#gmph-header').height() - 2) && scrollPos < ($('#gmph-intro-wrapper').position().top) + $('#gmph-intro-wrapper').height()) { 80 $('#gmph-nav-menu ul li a').removeClass("active"); 81 $('.empty').addClass("active"); 82 } 83 else { 84 currLink.removeClass("active"); 85 } 86 }); 87} 88 89var $gmphbg1 = $('#gmph-timeline-wrapper'); 90$gmphbg1.waypoint(function (direction) { 91 if (direction === 'down') { 92 $('#gmph-bg-container-0').removeClass('fadeIn'); 93 $( "#gmph-bg-container-0" ).addClass( "fadeOut" ); 94 } else if (direction === 'up') { 95 $('#gmph-bg-container-0').removeClass('fadeOut'); 96 $( "#gmph-bg-container-0" ).addClass( "fadeIn" ); 97 } 98}, { offset: '20%'}); 99 100var $gmphbg2 = $('#gmph-1950'); 101$gmphbg2.waypoint(function (direction) { 102 if (direction === 'down') { 103 $('#gmph-bg-container-1').removeClass('fadeIn'); 104 $( "#gmph-bg-container-1" ).addClass( "fadeOut" ); 105 } else if (direction === 'up') { 106 $('#gmph-bg-container-1').removeClass('fadeOut'); 107 $( "#gmph-bg-container-1" ).addClass( "fadeIn" ); 108 } 109}, { offset: '50%'}); 110 111var $gmphbg3 = $('#gmph-1970'); 112$gmphbg3.waypoint(function (direction) { 113 if (direction === 'down') { 114 $('#gmph-bg-container-2').removeClass('fadeIn'); 115 $( "#gmph-bg-container-2" ).addClass( "fadeOut" ); 116 } else if (direction === 'up') { 117 $('#gmph-bg-container-2').removeClass('fadeOut'); 118 $( "#gmph-bg-container-2" ).addClass( "fadeIn" ); 119 } 120}, { offset: '50%'});
121 122var $gmphbg3 = $('#gmph-1990'); 123$gmphbg3.waypoint(function (direction) { 124 if (direction === 'down') { 125 $('#gmph-bg-container-3').removeClass('fadeIn'); 126 $( "#gmph-bg-container-3" ).addClass( "fadeOut" ); 127 } else if (direction === 'up') { 128 $('#gmph-bg-container-3').removeClass('fadeOut'); 129 $( "#gmph-bg-container-3" ).addClass( "fadeIn" ); 130 } 131}, { offset: '20%'});
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.