<ul id="sortable"> <li id="1">elem 1</li> <li id="2">elem 2</li> <li id="3">elem 3</li> <li id="4">elem 4</li> </ul> $(document).ready(function(){ $('#sortable').sortable({ update: function(event, ui) { var newOrder = $(this).sortable('toArray').toString(); $.get('saveSortable.php', {order:newOrder}); } }); });
Kilde: http://stackoverflow.com/questions/7097168/save-jquery-ui-sortable-positions-to-db
Leave a Reply