event.preventDefault(); not stopping mousewheel in Firefox
问题 I am using the mousewheel in jquery to increase the number of a div, the number increases correctly but the scroll is not stopped in Firefox. $(document).ready(function(){ $('#test').bind('mousewheel DOMMouseScroll', function(event){ var currentValue = parseInt($('#test').text(),10), newValue = currentValue + 1; $('#test').text(newValue); event.preventDefault(); }); }); Fiddle: http://jsfiddle.net/rHVUn/ The fiddle uses the standard mousewheel detection, but I have also used Brandon Aaron's