javascript - jQuery disable scroll doesn't work in Firefox -
i use code in other projects , works fine. don't know wrong in code. works fine in chrome not in firefox.
this code:
$('body').on({ 'mousewheel': function(e) { e.preventdefault(); e.stoppropagation(); } });
body { height: 5000px; }
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
example jsfiddle.
the jquery version in project 1.11.3.
some browsers have there default "scroll-overflow" not on body. instand on html or document. try $('html')
or $(document)
example. help
Comments
Post a Comment