Created
July 22, 2008 07:51
-
-
Save bastien/704 to your computer and use it in GitHub Desktop.
Scroll to the bottom of an element using Prototype and Scriptaculous wokrs under Firefox and Safari (not tested under ie)
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
/* Scroll to the bottom of an element using Prototype and Scriptaculous | |
wokrs under Firefox and Safari (not tested under ie) | |
*/ | |
function scrollToBottom(element) | |
{ | |
var offset= window.innerHeight - $(element).getHeight() -10 ; | |
Effect.ScrollTo(element, {offset:-offset}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment