基本上该页面运行swf游戏。如果光标位于游戏中,则需要禁用鼠标滚轮功能。
这就是我试过的
jQuery(document).ready(function(){
jQuery('#gameplay-container').mouseenter(function(){
document.onmousewheel = function(){
return false
}
});
jQuery('#gameplay-container').mouseout(function(){
document.onmousewheel = function() {
return true;
}
});
});
似乎根本不起作用。当你在div上盘旋时,我确实找到了一种禁用滚动的方法,但是一旦加载了flash对象,它就会停止运行。 Flash wmode设置为透明,但也尝试了不透明。 #gameplay-container是包含flash对象的div。
答案 0 :(得分:0)
使用event.preventDefault()
和return false;
function(event) { event.preventDefault(); return false; }
答案 1 :(得分:0)
尝试直接使用鼠标滚轮功能:
$("#gameplay-container").bind("mousewheel", function() {
return false;
});