title: Remove dynamically added LI list item with jQuery
body: <p>I am trying to dynamically add a list item to a list and then remove it by clicking on that item.  The remove event never seems to fire.  However if I use the same code on a static list it works fine.  I've seen similar solutions but they do not work.</p>
  
  <p>See jsFiddle:
  <a href="http://jsfiddle.net/Lc2bC/" rel="nofollow">http://jsfiddle.net/Lc2bC/</a></p>
  
  <pre><code>&lt;input id="status" type="text" placeholder="Status (tab or enter)"&gt;
  
  &lt;br/&gt;
  Dynamic List:
  &lt;ul id="statusList"&gt;&lt;/ul&gt; 
  
  
  $('#status').keydown(function (e) {
      if (e.which == 9 || e.which == 13) {
          $('#statusList').html($('#statusList').html() + formatNewStatus(this.value));
          this.value = "";
          this.focus();
          e.preventDefault();
      }
  });
  
  $(function () {
      $('#statusList li').click(function () {
          alert('dynamicList');
          $(this).remove();
      })
  });
  </code></pre>