Thank you! I was making some stupid things like removing all events
from the element, but this is much nicer!
google.maps.event.addListenerOnce(infowindow, 'domready', function() {
// this event is added with mootools
$('direction').addEvent('click', function(){
$('hotspots-direction-from').setStyle('display',
'block');
});
});
On Mar 23, 6:50 pm, Rossko <[email protected]> wrote:
> > The above code works for 1 marker and 1 infowindow.
> > But if you have 50 markers and you start to click around, then the
> > clicked! alert is displayed as many time as you've clicked on a
> > marker...
>
> Yup.
> You could remember you've created a listener and not create another.
> You could look into addListenerOnce
>
> > Doing all this with inline js would be really easy - I could just make
> > a <a href="#" onlcick="javascript:blabla()">blabla</a>
>
> Yup.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.