title: Binding events to not yet created DOM elements (jquery)
body: <p>How do I bind events to html elements that don't exist at the time of the script loading?</p>
  
  <p>One part of my script adds these to the DOM:</p>
  
  <pre><code>&lt;a class="btn-remove-item" href=""&gt;link&lt;/a&gt;
  </code></pre>
  
  <p>The problem is I can't just do:</p>
  
  <pre><code>$(document).ready(function(){
  
      $(".btn-remove-item").click(function(){
          this.parentNode.removeChild(this);
      });
  });
  </code></pre>
  
  <p>.. I think because the DOM element isn't there when the page first loads.</p>
  
  <p>How should I bind the event to myClass?</p>