All Collections
Advanced Topics
Can I trigger javascript when the map marker window is opened?
Can I trigger javascript when the map marker window is opened?
Michael Fatica avatar
Written by Michael Fatica
Updated over a week ago

Yes.  In MetaLocator you can add Javascript to the Advanced > Header setting.  The below example will watch the ml_markeropened event and trigger custom code as needed.

<script>
 jqLocator( "body" ).on( "ml_markeropened", function(e) {
   alert('You opened a window!');
});
 </script>
Did this answer your question?