Javascript 禁用鼠标悬停时的谷歌地图缩放在IE上不起作用

Javascript 禁用鼠标悬停时的谷歌地图缩放在IE上不起作用,javascript,jquery,html,css,Javascript,Jquery,Html,Css,下面的代码正在所有浏览器中停止地图放大鼠标悬停滚动缩小,IE不使用。当我向下滚动页面,鼠标出现在地图上时,它停止滚动页面,并开始在IE上缩放谷歌地图 $(document).ready(function () { // you want to enable the pointer events only on click; $('#map_canvas1').addClass('scrolloff'); // set the pointer events to

下面的代码正在所有浏览器中停止地图放大鼠标悬停滚动缩小,IE不使用。当我向下滚动页面,鼠标出现在地图上时,它停止滚动页面,并开始在IE上缩放谷歌地图

$(document).ready(function () {

        // you want to enable the pointer events only on click;

        $('#map_canvas1').addClass('scrolloff'); // set the pointer events to none on doc ready
        $('#canvas1').on('click', function () {
            $('#map_canvas1').removeClass('scrolloff'); // set the pointer events true on click
        });

        // you want to disable pointer events when the mouse leave the canvas area;

        $("#map_canvas1").mouseleave(function () {
            $('#map_canvas1').addClass('scrolloff'); // set the pointer events to none when mouse leaves the map area
        });
    });

<div id="canvas1" class="map">
     <iframe id="map_canvas1" src="https://www.google.com/maps/embe...." width="1170" height="400" frameborder="0" style="border: 0"></iframe>
</div>
$(文档).ready(函数(){
//您希望仅在单击时启用指针事件;
$('#map_canvas1').addClass('scrolloff');//在doc ready上将指针事件设置为none
$('#canvas1')。在('click',函数(){
$('#map_canvas1')。removeClass('scrolloff');//单击时将指针事件设置为true
});
//当鼠标离开画布区域时,要禁用指针事件;
$(“#map_canvas1”).mouseleave(函数(){
$('#map_canvas1').addClass('scrolloff');//当鼠标离开映射区域时,将指针事件设置为无
});
});

请解释所需的行为以及IE的行为。上面的代码正在停止地图放大鼠标悬停缩小在所有浏览器中滚动(仅IE不参与)。当我向下滚动页面,鼠标出现在地图上时,它停止滚动页面,并开始在IE上缩放google地图。你应该编辑问题,而不是添加注释。你是否希望类
。scrolloff
以某种方式阻止地图上鼠标事件的事件处理程序?如果是,请发布与
相关的所有代码。滚动