-3

$(window).load(function () {
   $("table").sortable({
     items: "div",
     opacity: 0.6,
     cursor: 'move',
     update: function (event, ui) {
       var order = $('#form1').serialize();
       $.ajax({
         type: "POST",
         url: "Default7.aspx/Update",
         data: "{'NewOrder': '" + order + "'}",
         dataType: "json",
         contentType: "application/json"
       });
     }
   });
 }); 


[System.Web.Services.WebMethod]
public static void Update(string NewOrder)
{
}

我如何提醒新排序的行?

4

1 回答 1

0

试试这个:

$(document).ready(function () {
    $("table").sortable({ items: "div", opacity: 0.6, cursor: 'move', update: function (event, ui) {
         var order = $('#form1').serialize();
         $.ajax({
             type: "POST",
             url: "Default7.aspx/Update",
             data: {"NewOrder" : order },
             dataType: "json",
             contentType: "application/json",
             success:function(){// add success callback function to sort row
                // add you code to sort the table
                // or call $('table').sortable() again
             }
         });
       }
   });
}); 
于 2013-03-22T07:45:10.420 回答