Can i make jscrollpne such that parent pane doesnot scroll even when child scroll has reached its bottom. Now when child scrolling reaches bottom scrolling of parent occurs. I want parent to scroll only when mouse is out of child scrollpane.
The behaviour you describe is by design. This is how the native browser scrollbars behave on an element which has overflow: auto. I wouldn't recommend changing it. However, if you wish to then Borgenk's answer is correct, you can use this code:
$('.scroll-pane')
.jScrollPane()
.bind(
'mousewheel',
function(e)
{
e.preventDefault();
}
);
See an example here (you may need to shrink your window so the parent has any need to scroll): http://jsfiddle.net/VYcDZ/51/
You could use event.preventDefault()
$('.selector').mousewheel(function(event) {
event.preventDefault();
});
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