Reputation: 7278
I created a jsfiddle as an example http://fiddle.jshell.net/WBaXx/
In the result panel you will see google map and text "abcdefghijk" ... I wanted when user mouseover these text let the info windows pop up.
I successfully wrote the script but I am having a small problem is that when user move their mouse from letter "a" to "k" info windows blink.
The problem is because these text are in different html tags but BUT I am listening to mouseover of the parent html which is DIV. So this should not happen isn't it.
Any help ?
Thank You
Upvotes: 3
Views: 2603
Reputation: 91
If you're using jQuery in your page, then you can use mouseenter/mouseleave to control the triggering of your events.
From the api page @ http://api.jquery.com/mouseover/
... mouseover fires when the pointer moves into the child element as well, while mouseenter fires only when the pointer moves into the bound element.
Your jsfiddle updated below
http://fiddle.jshell.net/WBaXx/26/
Upvotes: 1
Reputation: 46
the flicker is caused by the "info window" being opened again - even though it is already open.
you can use
if (!infowindow.getMap())
to check is the info window is already open
http://fiddle.jshell.net/WBaXx/6/
Upvotes: 2