Jquery Sortable Connect List + PHP/MySQL
I've been searching everywhere for a solution without luck.
What I'm searching for i a way to merge the example found here http://jqueryui.com/demos/sortable/#connect-lists with PHP/MySQL.
There are several examples out there that works with just the one list i.e. http://www.wil-linssen.com/musings/entry/extending-the-jquery-sortable-with-ajax-mysql/
But I haven't found a single example with multiple lists.
Does anyone have ha solution or a link to an example that works?
开发者_如何学运维Thanks! /David
Add a callback (example taken & extended from the docs):
$( "#sortable1, #sortable2" ).sortable({
connectWith: ".connectedSortable",
update : function(event, ui) {
//ui.sender is the list the item comes from
//ui.item is the current item that moved
//ui.position is the current position
}
}).disableSelection();
Now do any ajaxy thing you want in the callback using the ui
paremeter.
精彩评论