Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Disable mousewheel events Reply To: Disable mousewheel events

#241810
Shikkediel
Participant

The other event listener is still in place and “blocking” the return true. Give this a try, removing the event listener :

function disable() {
$(window).on('wheel.impair', function() {
    return false;
});
}

function enable() {
$(window).off('wheel.impair');
}

Using a namespace (impair here) makes it easier to unbind only a particular listener instead of disabling all events …