get ID attribute from dragging a sortable portlet

get ID attribute from dragging a sortable portlet

Hello,

I want to pull the ID tag from a div that has been moved using sortable portlets. 

For example:  Here are my divs in the body


<div id="container">
  <div id="left" class="list" style="width: 49%; float:left;">
       <div class="portlet" id="arrayorder1">
<div class="portlet-header">header one</div>
<div class="portlet-content" id="one">portlet content one</div>
        </div>




       <div class="portlet" id="arrayorder2">
<div class="portlet-header">header two</div>
<div class="portlet-content" id="two">portlet content two</div>
        </div>


       <div class="portlet" id="arrayorder3">
<div class="portlet-header">header content</div>
<div class="portlet-content" id="three">portlet content</div>
        </div>
  </div>
</div>
Here is the jquery for sortable. Line 18 and 19 are where I am trying to pull the ID of the dragged portlet-content div. The problem is that it is not returning the ID of the dragged portlet but instead the first child of the portlet div. 






For example: I drag the bottom portlet into the middle. The JS alert will always return ID 1 from the top portlet-content div.
  1. <script type="text/javascript">
  2. $(function() {
  3. $(".list").sortable({ 
  4. connectWith: '.list',
  5. opacity: 0.6, cursor: 'move', update: function() {
  6. //alert (col);
  7. var order = $(this).sortable("serialize") + '&update=update';
  8. var name = $(this).children().attr("id");
  9. alert (name);

  10. $.post("updateList.php", {order:order}, function(theResponse){
  11. });  
  12. }  
  13. });
  14. });
  15. </script>