Created
July 13, 2011 18:01
-
-
Save charliepark/1080881 to your computer and use it in GitHub Desktop.
Javascript to include in jQuery in order to scroll to the bottom of the webpage.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// include this in your application.js file: | |
jQuery.fn.scrollToBottom = function(){ | |
var bottom = $(document.body).height(); | |
window.scrollTo(0, bottom); | |
}; | |
// and invoke it whenever you want, with this: | |
$().scrollToBottom(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment