smooth-scroll

simple smooth scrolling in the browser
git clone https://git.ce9e.org/smooth-scroll.git

commit
9d9cdfa9e2cd775e544a5a1a62e96e9f5cf36eca
parent
5f69dc05630e85f40f597b727d1b54dc81d4a46a
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2016-11-18 17:00
browser compatibility

Diffstat

M smooth-scroll.js 7 ++++---

1 files changed, 4 insertions, 3 deletions


diff --git a/smooth-scroll.js b/smooth-scroll.js

@@ -48,9 +48,10 @@
   48    48       smoothScrollTo(scrollY);
   49    49     };
   50    50 
   51    -1     document.querySelectorAll('[href^="#"]').forEach(function(el) {
   52    -1       el.addEventListener('click', smoothScrollClick);
   53    -1     });
   -1    51     var links = document.querySelectorAll('[href^="#"]');
   -1    52     for (var i = 0; i < links.length; i++) {
   -1    53       links[i].addEventListener('click', smoothScrollClick);
   -1    54     };
   54    55   };
   55    56 
   56    57   return {