开发者

Open info window if user hovers longer than x milliseconds

开发者 https://www.devze.com 2022-12-16 05:43 出处:网络
What I\'m trying to do is very simple: open the marker\'s info window only if the user has hovered on the marker for longer than x millisecond.

What I'm trying to do is very simple:

open the marker's info window only if the user has hovered on the marker for longer than x millisecond.

I can't find how to开发者_开发知识库 do this anywhere. I would appreciate a little code snippet to show me how to set this up!


The jQuery HoverIntent plugin might be able to help you

http://cherne.net/brian/resources/jquery.hoverIntent.html

hoverIntent is a plug-in that attempts to determine the user's intent... like a crystal ball, only with mouse movement! It works like (and was derived from) jQuery's built-in hover. However, instead of immediately calling the onMouseOver function, it waits until the user's mouse slows down enough before making the call.


Actually I finally found the solution to it on the Google Maps Group here: http://groups.google.com/group/google-maps-api/browse_thread/thread/73cf193d42a0bbfe/fa531a39b353d198?lnk=gst&q=open+hover#fa531a39b353d198

Best of luck to all the late night coders out there :)

0

精彩评论

暂无评论...
验证码 换一张
取 消