With jQuery I'm retrieving positions of a sortable list using 'serialize', like this:
var order = $('ul').sortable('serialize');
The variable 'order' then receives the following:
id[]=2&id[]=3&id[]=1&id[]=4&id[]=5
Now how can I use this data in an ajax call?
This is how I plan to do it, but it's ugly and I can't change the parameter name 'id':
$.post('ajax.php?'+order,{action:'updateOrder'});
Maybe I need to unserialize, then implode the variable 'order' and assign it to just one parameter?