I can't figure out how to scroll ALL my panes to the top.
Here is the pertinent code:
// dynamically assign ids and jScrollPane, I would rather not assign
any IDs...
$('.scrollpane').each(function(n) {
$(this).attr('id', 'scrollpane'+n);
$(this).jScrollPane({showArrows:true, scrollbarWidth: 11});
});
etc...
function scrollAllToTop() {
$('#scrollpane1')[0].scrollTo(0); // will scroll that one id to
the top, just as described
// but, why doesn't this work? I keep getting $(this)[0].scrollTo
is not a function
$('.scrollpane').each(function() {
//alert($('#scrollpane1')[0] == $(this)[0]); // yup it finds
one same object in the list...
$(this)[0].scrollTo(0);
});
}