This is what I have so far.
The code I have is contained in php so there is some php in it.
$(document).ready(function() {
$(\"ul.droptrue\").sortable({
connectWith: '.droptrue',
remove:function(event, ui){
var order = $(ui.item).serialize;
alert( order );
},
receive : function () {
var order = $(this).sortable('serialize');
var list = 'list[]='+this.id+'&list[]=".$module[1]."&';
$.ajax({
type: 'POST',
url: '".__BASE_URL."modules/admin/moduleUpdate.php',
data: list+ order,
success: function(msg){alert(msg);},
error: function(msg){alert( \"Data Error: \"
+ msg );}
});
}
}); });
So what I am trying to do is get a serialized version of the ui.item. With the receive section I get an output of “listItem[]=3&listItem[]=4…” but with the ui.item I get “function () {return o.param(this.serializeArray());}”.
How do I get a serialized version of ui.item?
I figured out what I was doing wrong. So this question does not need anymore help.
A brief summary of what I did.
I used the update function of the sortable and then I used php to determine what is being change and how to change it.
Here is the jquery code:
Here is the php I used:
These pieces of code allow me to create a drag and drop list to dynamically layout my website without any hassle. I hope these pieces of code could help someone out that is having the same type of problem that I was having.