I have been unsuccessful getting the mouse wheel to scroll a horizontal jscrollpane. Does anyone have experience with this and can offer some pointers.
In the comments of the js file I see the following update just a couple of months ago // 2.0.0beta3 - (2010-08-27) Horizontal mousewheel, mwheelIntent, keyboard support, bug fixes
I've looked on the github issues page and Kelvin's FAQ and known issues pages as well as the google group and nothing makes me think this shouldn't be possible.
Any assistance is appreciated.
You could use something like this:
$('.scroller').each(function(){
var scrollPane = $(this).jScrollPane();
var api = scrollPane.data('jsp');
scrollPane.bind(
'mousewheel',
function (event, delta, deltaX, deltaY)
{
api.scrollByX(delta*-50);
return false;
}
);
});
Change -50 to another value to change the speed and direction of the scrolling.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With