example: http://jsbin.com/ofifiy/2/edit#preview
i try to scroll a div (red one) with a non scrollable div (green one).
My problem is, when i scroll on the green div, the jquery scroll() does not fire.
HTML
<div id="targetWithNoScroll" style="border:1px solid #0f0; width:100px; height:100px;">
scroll here = scroll the red div<br />
</div>
JS
$('#targetWithNoScroll').scroll(function() {
$('body').append('No scroll <br />');
});
You need to bind the mousewheel event to that div.
Unfortunately there is no native jQuery mousewheel event, so you have to pick a plugin or write it yourself. But I would recommend taking one of these as it saves you a lot of time:
http://css-tricks.com/snippets/jquery/horz-scroll-with-mouse-wheel/
1) Load jQuery and the Mouse Wheel plugin
Mouse Wheel plugin is here.
2) Attach mousewheel event to body
The “30” represents speed. preventDefault ensures the page won’t scroll down.