title: Create new div dynamically with jQuery and use it?
body: <p>I tried this</p>
  
  <pre><code>$(document).ready(function(){
      var conntent = $("#conntent");
      $('#form_post').submit(function(){
          if($("#set").val() != ''){
               $.post('post.php', $("#form_post").serialize(), function(data){
                   conntent.append('&lt;div class="item"&gt;&lt;span&gt;' + data + 
                   '&lt;/span&gt;&lt;/div&gt;');
               });
          }
          $("#set").val('');
          return false;
       });    
  
     //Then I try to click on new the new element
  
          $('span').click(function(){
              alert("OK");
          });
     });
  </code></pre>
  
  <p>However, after this I can't use click on the <code>spans</code></p>
  
  <p>I think is it possible after appending them that the are not part of the DOM.  Any suggestions?</p>