title: jQuery on click for dynamic element triggering when not clicked
body: <p>I have a button that I am appending to the page. When that button is clicked, it should run some code.</p>
  
  <p>Instead of triggering only when that button is clicked, any clicks on the page triggers it.</p>
  
  <p>I've been able to replicate the issue with only a few lines of code, see the JSFiddle linked.</p>
  
  <pre><code>var myButton = '&lt;div id="myButton"&gt;Do Not Click Me&lt;/div&gt;';
  $('#parent').html(myButton);
  
  jQuery(document).on('click', jQuery('#myButton'), function (e) {
      alert('marco');
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/aj4u1y9n/" rel="nofollow">https://jsfiddle.net/aj4u1y9n/</a></p>
  
  <p>How can I make the alert run only when the button is clicked?</p>