title: Jquery Connected Lists - Updated Serialized list value in input fields
body: <p>Guyz, I am trying to solve a problem.</p>
  
  <p>I have two lists that are sortable with connectWith in jQuery. I am trying to make a process that updates every time an item is moved from one list to another that updates two hidden input fields with the serialized list of id's from each list. </p>
  
  <pre><code>$(function() {
      $( "#sortable1, #sortable2" ).sortable({
          connectWith: ".connectedSortable"
  
      }).disableSelection();
  });
  </code></pre>
  
  <p>I would like to do this:</p>
  
  <pre><code>    var list = '';
      $('#sortable1 *').each(function() {
          list += $(this).attr('id') + ',';
      });
      alert('list = ' + list);
  </code></pre>
  
  <p>but on every change it would update two input fields instead of doing an alert with the list.</p>