-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 に答える