Skip to content

Instantly share code, notes, and snippets.

@VoloshchenkoAl
Last active August 18, 2016 07:55
Show Gist options
  • Save VoloshchenkoAl/f4d09223820649eba017 to your computer and use it in GitHub Desktop.
Save VoloshchenkoAl/f4d09223820649eba017 to your computer and use it in GitHub Desktop.
var scroll = function( srollFromEl, srollToEl ){
srollFromEl.click(function( e ){
e.preventDefault();
$('html, body').stop().animate({
'scrollTop': srollToEl.offset().top
}, 900, 'swing');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment