Saving Scroll Down
I have a shoutbox and I want the scroll to go down just like the IM windows.
My html
<div id="shoutContainer"> <table id="shoutbox"> <tbody> <!-- shouts here --> </tbody> </table> </div> My css
#shoutContainer { height: 100px; overflow-y: scroll; } If this is not possible via html and css. Can we achieve this in raw javascript? because I do not use the framework
+7
Shishant
source share2 answers
Whenever an item is added, follow these steps:
document.getElementById('shoutContainer').scrollTop = 10000; // or some other big number edited
+14
James
source shareI'm not sure you can only do this with CSS, but here is a great jQuery solution: Ajaxdaddy shoutbox .
Here is a free call window to make your client happy:
I just did this to make sure this is normal, an example is here .
0
Kyle
source share