Skip to content

Instantly share code, notes, and snippets.

@ibrahimkholil
Last active October 10, 2018 13:12
Show Gist options
  • Save ibrahimkholil/2bc77960bd68dedaee022cfe3cf2f7a0 to your computer and use it in GitHub Desktop.
Save ibrahimkholil/2bc77960bd68dedaee022cfe3cf2f7a0 to your computer and use it in GitHub Desktop.
Scroll Down section scroll up
$('a[href*=#]').on('click', function(e) {
e.preventDefault();
$('html, body').animate({ scrollTop: $($(this).attr('href')).offset().top}, 500, 'linear');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment