javascript - The delta in mousewheel does not have result -
i want create function mousewheel in jquery, when want check delta result "undefined", please me here code
$(document).ready(function(){ $('#container').bind('mousewheel', function(event,delta){ alert(delta) }); })
what browser using test in? there more 1 way bind mouse wheel event , depending on browser determine find delta. in firefox it's event.detail
, it's values can 1, 2, -1, -2, etc
in non-firefox browsers you're looking @ wheeldelta
appears coded for.
a resource on mousewheel events here used when wrote jquery mousewheel plugin.
Comments
Post a Comment