Advertisement
Guest User

Untitled

a guest
Dec 1st, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.     $( "#sortable" ).sortable({
  3.         update : function () {
  4.             $( "#log" ).load("/wp-admin/admin-ajax.php");
  5.             var serial = $( "#sortable" ).sortable('serialize');
  6.             alert(serial);
  7.             $.ajax({
  8.                 url: "/wp-admin/admin-ajax.php",
  9.                 type: "post",
  10.                 data:  {action: 'MyAjaxFunction', serial: serial,},
  11.                 error: function(){
  12.                     alert("theres an error with AJAX");
  13.                 },
  14.                 success: function(){
  15.                     alert("AJAX SUCCESS");
  16.                 }
  17.             });
  18.         }
  19.     });
  20.     $( "#sortable" ).disableSelection();
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement