Reputation: 47
I have a jScrollpane (jQuery) problem
I use jScrollpane on my website. I have dynamic content that makes the scroll-area larger. This makes the attribute autoReinitialise mandatory. I also want to use the animateScroll attribute, but if I use those at the same time, the scrollbar wil go mad (mad i tell you!).
Does someone know what's up with that?
http://www.bidadari.nl/?page_id=98
var pane = jQuery("#scroll_area");
pane.jScrollPane({
autoReinitialise: true,
showArrows: true,
verticalArrowPositions: "split",
horizontalArrowPositions: "split",
animateScroll: true
});
var api = pane.data("jsp");
jQuery("#button_step_right").bind("click", function() {
api.scrollByX(750);
return false;
});
Thanks!
Eric
Upvotes: 0
Views: 2934
Reputation: 47
ah. The correct answer was:
var pane = jQuery("#scroll_area");
pane.jScrollPane({
autoReinitialise: true,
showArrows: true,
verticalArrowPositions: "split",
horizontalArrowPositions: "split",
/// animateScroll: true
});
var api = pane.data("jsp");
jQuery("#button_step_right").bind("click", function() {
api.scrollByX(750, true); /// <- true
return false;
});
Upvotes: 2