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

Version Path
slow-steps-1.0.8 assets/js/nav-scroll.js
slow-steps-1.0.6 assets/js/nav-scroll.js
slow-steps-1.0.5 assets/js/nav-scroll.js
slow-steps-1.0.4 assets/js/nav-scroll.js
slow-steps-1.0.3 assets/js/nav-scroll.js
slow-steps-1.0.2 assets/js/nav-scroll.js
slow-steps-1.0.1 assets/js/nav-scroll.js
slow-steps-1.0.0 assets/js/nav-scroll.js
slow-steps-0.4.14 assets/js/nav-scroll.js
slow-steps-0.4.13 assets/js/nav-scroll.js
slow-steps-0.4.12 assets/js/nav-scroll.js
slow-steps-0.4.11 assets/js/nav-scroll.js
slow-steps-0.4.10 assets/js/nav-scroll.js
slow-steps-0.4.9 assets/js/nav-scroll.js
slow-steps-0.4.8 assets/js/nav-scroll.js
slow-steps-0.4.7 assets/js/nav-scroll.js
slow-steps-0.4.6 assets/js/nav-scroll.js
slow-steps-0.4.5 assets/js/nav-scroll.js
slow-steps-0.4.4 assets/js/nav-scroll.js
slow-steps-0.4.3 assets/js/nav-scroll.js