鼠标滚动事件兼容性 wheel、onwheel

wheelEvent = "onwheel" in document.createElement("div") ? "wheel" : // Modern browsers support "wheel"

document.onmousewheel !== undefined ? "mousewheel" : // Webkit and IE support at least "mousewheel"

"DOMMouseScroll"; //滚动事件的兼容

$scrollbar.addEventListener(wheelEvent,function(){ $("#tl_listgroup").css("top","0px"); },false)

posted @ 2015-08-29 17:52  沐浴点阳光  阅读(1667)  评论(0编辑  收藏  举报