title: can't bind to click event in jquery
body: <p>It is a silly problem to make a li dom, add the li to ul, and enable the click on the li dom.
  The code snippet works by adding the li dom to the ul, </p>
  
  <pre><code>var li = '&lt;li&gt;&lt;a href="#" data-action="app"&gt;' + name +'&lt;/a&gt;&lt;/li&gt;';
  $("ul").append( li ); 
  $(li).bind('click',onClick);
  function onClick(e){
      console.log('click   ',$(this).html());
  }
  </code></pre>
  
  <p>but when I use the <strong>$(li).bind('click',onClick);</strong> it doen'st seem to work, I am very confused why ?</p>