title: jQuery live draggable / live droppable?
body: <p>Basically there are two tables: Companies and visitors. Currently it's possible to drag visitors to companies. Works great. As soon as the drop function occurs, there are two $.post's. The first one saves the drag to the database. The second one updates the visitors, because the information constantly changes. The problem, however is that as soon as the second $.post finishes, Firebug keeps popping the following error:</p>
  
  <pre><code>d(this).data("draggable") is null
  </code></pre>
  
  <p>Which occurs in the jQuery UI file. On line 56.</p>
  
  <p>about 400 times or so. So basically I'm looking for a way to do live() with draggable and droppable.</p>
  
  <p>The .draggables are in #visitors (an ul). The droppables are in #companies (a table).</p>
  
  <p>Thanks!</p>
  
  <pre><code>$(".draggable").draggable({
      revert:true
  });
  $(".droppable").droppable({
      drop: function(ev, ui) {
          $(this).text($(ui.draggable).text());
  
          $.post('planning/save_visit', {user_id: $(ui.draggable).attr('id'), company_id: $(this).attr('id'), period: $('ul.periods li.active').attr('id')});
  
          $.post('planning/' + $('ul.periods li.active').attr('id'), {visitors:true}, function(data){
              $('#visitors').html(data);
          });
      },
      hoverClass: 'drophover'
  });
  </code></pre>