diff --git a/docs/css/default.css b/docs/css/default.css index 5f1928bfd313..285b7eb52f70 100644 --- a/docs/css/default.css +++ b/docs/css/default.css @@ -6,6 +6,7 @@ html, body { box-sizing: border-box; + scroll-behavior: smooth; } *, *:before, *:after { diff --git a/docs/js/index.js b/docs/js/index.js index 029a9e703efd..493be83e2292 100644 --- a/docs/js/index.js +++ b/docs/js/index.js @@ -1,21 +1,4 @@ $(document).ready(function() { window.sr = ScrollReveal(); sr.reveal(".scala-logo-container", { duration: 2000, delay: 100, mobile: false }); - - var hostname = new RegExp(location.host); - $('a').each(function(){ - var url = $(this).attr("href"); - if (hostname.test(url) || url.slice(0, 1) == "#") - $(this).addClass('local'); - }); - - $("a").on('click', function(event) { - if ($(this).hasClass("local") && this.hash != "") { - event.preventDefault(); - var hash = this.hash; - $('html, body').animate({ scrollTop: $(hash).offset().top }, 800, function() { - window.location.hash = hash; - }); - } - }); });