在jQuery中获取鼠标轮事件吗?有什么方法可以让鼠标轮事件发生(不是说scroll事件)在jQuery中?
3 回答
芜湖不芜
TA贡献1796条经验 获得超7个赞
$(document).ready(function(){
$('#foo').bind('mousewheel', function(e){
if(e.originalEvent.wheelDelta /120 > 0) {
console.log('scrolling up !');
}
else{
console.log('scrolling down !');
}
});});添加回答
举报
0/150
提交
取消
