I posted this a few days ago on stackoverflow but got no help with the problem so I'm hoping someone here can help.

I'm trying to catch mousewheel events on the document and if their target was not the scrolling element on the page, I want to forward the mousewheel event onto the scrolling element.

The alternative would be to scroll the element directly but that would overrule user's scrolling speeds.

Code:
function dispatchWheelEvent_Chrome($el, delta) {
    var el = $el[0];
    var evt = document.createEvent("MouseEvents");
    evt.initEvent('mousewheel', true, true);
    evt.wheelDelta = delta;
    el.dispatchEvent(evt);
}

$(document).bind('mousewheel', function (e) {
    var targetIsChildOfScrolling = ($(event.target).closest('#scrolling').length > 0);
    //Check if it should be forwarded
    if (targetIsChildOfScrolling) return;

    console.log('Forwarding ' + e.originalEvent.wheelDelta);
    dispatchWheelEvent_Chrome($('#scrolling'), e.originalEvent.wheelDelta);
});

I'm trying to catch mousewheel events on the document and if their target was not the scrolling element on the page, I want to forward the mousewheel event onto the scrolling element.

The alternative would be to scroll the element directly but that would overrule user's scrolling speeds.

Here's a fiddle as well http://jsfiddle.net/8Fg9M/