1/* ------------------------- 2Flickering Sticky Navigation 3---------------------------- */ 4 5console.log("The new Sticky Header :)"); 6 7window.addEventListener('DOMContentLoaded', function () { 8 9 var stickyheader = document.querySelectorAll(".navbar-fixed-top"); 10 if (stickyheader.length >= 1) { 11 function animateHeader() { 12 if (window.scrollY >= stickyheader[0].getBoundingClientRect().bottom && 13 !stickyheader[0].classList.contains("navbar-transition")) 14 { 15 stickyheader[0].classList.add("navbar-transition"); 16 } 17 else if (window.scrollY < stickyheader[0].getBoundingClientRect().bottom && 18 stickyheader[0].classList.contains("navbar-transition")) 19 { 20 stickyheader[0].classList.remove("navbar-transition"); 21 } 22 } 23 ['scroll', 'resize', 'DOMContentLoaded'].forEach(function (e) { 24 window.addEventListener(e, animateHeader); 25 }); 26 animateHeader(); 27 } 28 29});
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.