Closed GoogleCodeExporter closed 9 years ago
Here is the code I am using:
$('#scrollwrap_'+objectName).scrollTo(600);
Original comment by lylepr...@gmail.com
on 15 Apr 2009 at 4:12
scrollTo is a method on the DOM element itself, not on the jQuery object. See
this
demo for usage:
http://www.kelvinluck.com/assets/jquery/jScrollPane/scrollTo.html
Basically you need to do:
$('#scrollwrap_'+objectName)[0].scrollTo(600);
Hope that helps,
Kelvin :)
Original comment by kelvin.l...@gmail.com
on 15 Apr 2009 at 4:19
Ahh I see. Thanks for your help!
Heres another question:
Could I just manually set the focus on the element (using $.focus()??) I want to
scroll to and wouldnt your plugin automatically scroll there?
Original comment by lylepr...@gmail.com
on 15 Apr 2009 at 4:22
Yes - that could quite possibly work. Only certain elements can be focused
though (in
a cross browser manner). If the element in question is an link or a form
element that
should work great... You can also use .scrollTo('JQUERY_SELECTOR') to scroll a
particular element to the top of the visible pane (where JQUERY_SELECTOR is a
jquery
selector to find the element you want to scroll to)...
Original comment by kelvin.l...@gmail.com
on 24 Apr 2009 at 6:00
Original issue reported on code.google.com by
lylepr...@gmail.com
on 15 Apr 2009 at 4:03