title: How to detect the item has been dropped in the same sortable list
body: <p>I have two connected sortable lists. My code works fine for when I drag one element from the list on the left side to the one on the right side, but can you tell me what event should I be looking for if I want to know the order of items in the left list when an item gets dragged and dropped in the same list (basically reorder the items in the same list, not dragging and dropping to the other list but to the same). </p>
  
  <p>Thank you.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Here is the link to the code: <a href="http://jsfiddle.net/Hitman666/WEa3g/1/" rel="noreferrer">http://jsfiddle.net/Hitman666/WEa3g/1/</a></p>
  
  <p>So, as you will see I have an alert when items are dragged and dropped in oposite lists, but I need an event also for when the list (for example the green one) gets reordered. Then I would need to alert the order, for example: <code>4,3,2,1</code></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul id="sortable1" class="connectedSortable"&gt;
      &lt;li&gt;Item 1&lt;/li&gt;
      &lt;li&gt;Item 2&lt;/li&gt;
      &lt;li&gt;Item 3&lt;/li&gt;
      &lt;li&gt;Item 4&lt;/li&gt;
  &lt;/ul&gt;
  
  &lt;ul id="sortable2" class="connectedSortable"&gt;
      &lt;li&gt;Item 5&lt;/li&gt;    
      &lt;li&gt;Item 6&lt;/li&gt;
      &lt;li&gt;Item 7&lt;/li&gt;
      &lt;li&gt;Item 8&lt;/li&gt;    
  &lt;/ul&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
  #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
  
  #sortable1 li{background: green;}
  #sortable2 li{background: yellow;}
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$(function() {
      $("#sortable1, #sortable2").sortable({
          connectWith: ".connectedSortable",
          receive: myFunc
      }).disableSelection();
  
      function myFunc(event, ui) {
          alert(ui.item.html());
      }
  });
  </code></pre>