Skip to content

Instantly share code, notes, and snippets.

@davidvandenbor
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save davidvandenbor/aa7c71267ef37fb6662f to your computer and use it in GitHub Desktop.

Select an option

Save davidvandenbor/aa7c71267ef37fb6662f to your computer and use it in GitHub Desktop.
Jquery Javascript Scrolldown Button
$(document).ready(function(){
// button is the ID (or use class, like so '.button') of the object that triggers the scrolling
$('#button').on('click',function(){
// in this case, '#content' is the ID that is being scrolled to
$('html, body').animate({scrollTop: $("#content").offset().top}, 1400);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment