Thanks Ariel, I forgot to mention, but I had also tried the [0].scrollTo, and that didn't work either.
I've also just tried [code] var firstList = $('#holder .list:first'); $("#holder").jScrollPane(function(response){ ("#holder").scrollTo(firstList); }) [/code] and with the [0].scrollTo, but no luck. The scroll bar adjusts in size to fit the newly loaded ajax list, but it doesn't go to the top. of that list. On May 19, 8:05 am, Ariel Flesler <[EMAIL PROTECTED]> wrote: > I THINK you need to do: > > $("#holder")[0].scrollTo(firstList); > > If you can't solve that part, you could check ScrollTo: > http://flesler.blogspot.com/2007/10/jqueryscrollto.html > > Cheers > > -- > Ariel Fleslerhttp://flesler.blogspot.com/ > > On 18 mayo, 20:06, pedalpete <[EMAIL PROTECTED]> wrote: > > > Hey, > > > I'm using Kevin Luck's jScrollPane on an ajax retrieved list. > > > The first time I call the page, it works no problem, but when I reload > > the ajax content, if the user has scrolled down, the scroll doesn't > > return to the top. > > > I call the jScrollPane again on each ajax reload so that the scroller > > adjusts to the length of content on the page. > > But the scroller does not return to the top of the sroller. > > > So i've tried adding the .scrollTo function but can't seem to get that > > to work. > > > I've tried .scrollTo(2) , thinking it would scroll to 2px from the > > top. > > I've also tried calling the first item in the returned list, and > > scrolling to that, but that isn't working either. > > > Any ideas? > > > [code] > > var firstList = $(response+' .list:first'); > > $("#holder").jScrollPane(function(response){ > > > > ("#holder").scrollTo(firstList); > > }) > > [/code];