diff --git a/styleguide.html b/styleguide.html index 817e0b2..0c1b965 100644 --- a/styleguide.html +++ b/styleguide.html @@ -1153,6 +1153,11 @@ var observer = new IntersectionObserver(function(entries) { document.querySelectorAll('.reveal, .reveal-scale').forEach(function(el) { observer.observe(el); }); + +// Prevent href="#" demo links from scrolling to top +document.querySelectorAll('a[href="#"]').forEach(function(a) { + a.addEventListener('click', function(e) { e.preventDefault(); }); +});