我创建了鼠标滚动事件。它在 Chrome 上运行完美,但在 IE、Firefox、Safari 上无法运行。请帮助我。
最佳答案
尝试使用 DOMMouseScroll, mousewheel, wheel
它应该可以工作。
$('#foo').bind('DOMMouseScroll mousewheel wheel', function(e){
if(e.originalEvent.wheelDelta /120 > 0) {
alert('up');
}
else{
alert('down');
}
});
它在 firefox 中使用鼠标滚动。
关于javascript - 鼠标 ScrollLeft 不适用于 IE、Firefox、Safari,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34946178/