Skip to main content
All CollectionsAdvanced 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 6 years 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?