Lock Mouse Scroll

2

How do I block the mouse whelo scrolling on a div using JavaScript or jQuery?

    
asked by anonymous 13.10.2015 / 12:26

1 answer

3

You can do this as follows with Javascript:

document.getElementById('meuID').onwheel = function(){ return false; }
body {height:1000px;}
#meuID {
    width:150px;
    height:200px;
    border:1px solid #000;
    overflow-y: scroll;
}
<div id="meuID">
    <div style="height:1200px;"></div>
</div>
    
13.10.2015 / 12:56