PDA

View Full Version : Scroll back to the top



Kurt001
17 Mar 2011, 12:19 PM
Hi there,

I set the scroll:'vertical' to a panel with a <div id='content'>.
Then I scroll to the bottom and change the content of the div to something not as long.

Now I would like to scroll back all to the top automatically. Is that possible

Best
Kurt

d5chris
17 Mar 2011, 2:27 PM
Hey mate, just had the same problem and here's what i did:

myPanel.scroller.setOffset({x:0,y:0});

Or to animate it:

myPanel.scroller.setOffset({x:0,y:0}, true);