> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.metalocator.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Can I trigger javascript when the map marker window is opened?

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>
```