Skip to content

Instantly share code, notes, and snippets.

@63phc
Created February 13, 2018 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 63phc/f2673d64e9baff3cace31bb860166c4e to your computer and use it in GitHub Desktop.
Save 63phc/f2673d64e9baff3cace31bb860166c4e to your computer and use it in GitHub Desktop.
slow_scroll
// slow_scroll
$('a[href*="#"]').click(function() {
$page.animate({
scrollTop: $($.attr(this, 'href')).offset().top
}, 1000);
return false;
});
@AAO2014
Copy link

AAO2014 commented Mar 13, 2019

What about this?

html {
scroll-behavior: smooth;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment