Skip to content

Instantly share code, notes, and snippets.

@mintyPT
Created March 15, 2017 14:43
Show Gist options
  • Save mintyPT/08abd014b4041918d19740a32c767d04 to your computer and use it in GitHub Desktop.
Save mintyPT/08abd014b4041918d19740a32c767d04 to your computer and use it in GitHub Desktop.
Animate scroll with jquery - example
jQuery('.scroll-to-me').on('click', function(e) {
var $this = jQuery(this);
jQuery('html, body').animate({
scrollTop: $this.offset().top
}, 500);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment