lynxus Posted August 11, 2009 Share Posted August 11, 2009 Hi guys , I have this: This basically just keeps a div scrolled to the bottom all the time. My question is.. How can i do it so it would ONLY run if the scrollbar is currently at the bottom. IE: If (scrollbar == bottom) { runscript; }else{ dont } What i want to achieve is this script will only run if the user has scrolled to the bottom , if they were to scroll up again it wouldnt run ( until they bring the scrollbar back to the bottom ) <script language="javascript" type="text/javascript"> function scroller(){ var objDiv = document.getElementById("sessiontext"); objDiv.scrollTop = objDiv.scrollHeight; } </script> Many thanks for looking -G Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.