1(function($) { 2 3 var $heroNav = $('#masthead'); 4 var heroNavEnd = function() { 5 if($heroNav.length==0) return 0; 6 return parseInt($heroNav.css('top').match(/([\d]+)/)[0]) + $heroNav.outerHeight() + 20; 7 }; 8 9 $(document.body).on('click', 'a[href^="#"]:not(.sr-only):not(.screen-reader-text):not(.screen-reader-link):not(.no-scroll)', handleAnchor); 10 11 function handleAnchor(e) { 12 if (!(this.hash.length>0 && this.hash !== '#' && this.hasAttribute('data-vc-tabs')===false && this.hasAttribute('data-vs-accordion')===false)) return; 13 var $el = $(this.hash); 14 15 if($el.length==0) return; 16 17 //console.log('scroll'); 18 19 var startHeroNavEnd = heroNavEnd(); 20 var top = $el.offset().top - (parseInt($el.css('marginTop')) + startHeroNavEnd); 21 e.preventDefault(); 22 $("html, body").animate({ 23 scrollTop: top, 24 }, { 25 step: function(now, tween) { 26 //console.log(now); 27 //console.log(tween); 28 if(heroNavEnd() !== startHeroNavEnd) { 29 startHeroNavEnd = heroNavEnd(); 30 $(this).stop().animate({scrollTop: $el.offset().top - (parseInt($el.css('marginTop')) + startHeroNavEnd)}); 31 } 32 }, 33 progress: function(animation, progress, remaining) { 34 //console.log(progress); 35 } 36 }, 1000); 37 return false; 38 } 39})(jQuery);
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.