views:

56

answers:

2

Hi,

I have an auto overflowed DIV on my page, what i want to do is to make it start scrolling slowly towards the end of items of the DIV on page onload.

is that easy u think ?

+1  A: 

Yes. Use the .load() event in jQuery to install a timer which updates the scroll position of the DIV using .scrollTop()

Aaron Digulla
have a short example ?
Ahmet vardar
+3  A: 
$("#divID").animate({'scrollTop': '600'}, 5000);

For instance.

Kind Regards

--Andy

jAndy
thx thats what i was looking
Ahmet vardar
i just have a problem, it doesnt scroll until the end, just stops after somewhere, any idea?
Ahmet vardar
well, value of 'scrollTop' within .animate says, how many pixel it is supposed to scroll. You can calculate that value or just increase it static.
jAndy