title: jquery drog drop order for three level
body: <p>How can i get child level li to dragdrop? its working for me but the second level order does not save in database table,</p>
  
  <p>this is my javascript</p>
  
  <pre><code>  $(document).ready(function(){     
            function slideout(){
        setTimeout(function(){
        $("#response").slideUp("slow", function () {
            });
  
      }, 2000);}
  
          $("#response").hide();
          $(function() {
              $("ul.main, ul.child").sortable({ opacity: 0.8, cursor: 'move', update: function() {
                  var order = $(this).sortable("serialize") + '&amp;update=update'; 
                  $.post("", order, function(theResponse){
                      $("#response").html("Order Saved");
                      $("#response").slideDown('slow');
                      slideout();
                  });                                                              
              }
  
          });
  
  
          });
  
      }); 
  
  &lt;ul class="main"&gt;
      &lt;li&gt;&lt;span id="arrayorder_1"&gt;item1
         &lt;ul class="child"&gt;
             &lt;li&gt;&lt;span id="arrayorder_2"&gt;item2&lt;/li&gt;
             &lt;li&gt;&lt;span id="arrayorder_3"&gt;item3&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;span id="arrayorder_4"&gt;item4&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>the reorder javascript is working but the child data not saving in to db..</p>
  
  <p>this is order php code</p>
  
  <pre><code>$child  = $_POST['arrayorder'];
  
  
      if ($_POST['update'] == "update"){
  
          $count = 1;
          foreach ($array as $idval) {
            MyModel::newInstance()-&gt;updateMenuItemOrder( $idval, $count); 
              $count ++;  
          }
  
      }
  </code></pre>
  
  <p>main order saved correctly but child order dosn't 
  how can i save the child  data to data table</p>