jQuery or Javascript - how to disable window scroll without overflow:hidden;

The Solution to jQuery or Javascript - how to disable window scroll without overflow:hidden; is


Try to handler 'mousewheel' event on all nodes except one

$('body').on({
    'mousewheel': function(e) {
        if (e.target.id == 'el') return;
        e.preventDefault();
        e.stopPropagation();
    }
})

Demo: http://jsfiddle.net/DHz77/1/

~ Answered on 2013-11-06 17:06:14


Most Viewed Questions: