title: javascript - add a js confirm to mailto link
body: <p>Is there a way with javascript to automatically have the page look for any mailto links and then have it fire off an confirm dialog when a user clicks on the mailto link?</p>
  
  <p>From this site I found a way to do so for an alert. I am beyond a novice with javascript.</p>
  
  <p>We need to warn people not to include confidential information in the their email without having an existing relationship.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;a href="mailto:name@domain.com"&gt;Email Link&lt;/a&gt;
  </code></pre>
  
  <p><strong>Javascript:</strong></p>
  
  <pre><code>$('a[href^="mailto"]').on('click',
  function() {
  alert('This is some alert text');
  });
  </code></pre>