Sha256: 4109da8492c2367f46c60d578a93cd644a7d2835a67d78dc342ef4737b3e845b
Contents?: true
Size: 468 Bytes
Versions: 34
Compression:
Stored size: 468 Bytes
Contents
navbar = document.querySelector('nav'); function navBarScroll() { var currentScrollPos = window.pageYOffset; if (window.pageYOffset != 0) { navbar.classList.add('nav-scrolled'); } else { navbar.classList.remove('nav-scrolled'); } }; /* load nav color if reloading and pageYOffset != 0 */ /* moved to scripts to avoid conflicts with other onloads */ /*window.onload = function() { navBarScroll() };*/ window.onscroll = function() { navBarScroll() };
Version data entries
34 entries across 34 versions & 1 rubygems