我可以检查鼠标是否还在盘旋吗?

时间:2015-02-03 18:44:43

标签: javascript jquery

我正在使用Google的信息窗口。

google.maps.event.addListener(marker, 'mouseover', function(clicked) {
            info.setContent(self.createInfoWindowFor(attr, refs));
            info.open(self.map, this);
});

在鼠标悬停时,会出现一个新的工具提示框。我想要做的是检查鼠标是否仍然在每5秒中盘旋。如果没有,请关闭信息框。我怎么能这样做?

1 个答案:

答案 0 :(得分:0)

 google.maps.event.addListener(marker, 'mouseover', function() {
    infowindow.open(map,marker);
  });
  google.maps.event.addListener(marker, 'mouseout', function() {
    infowindow.close(map,marker);
  });

鼠标悬停和mouseout如果您只想在标记结束和标记输出上显示弹出窗口

相关问题