What is the output of the following code?
<li>example 1
<li>example 2
<li>example 3
<li>example 4
$(document).ready(function(){
$(‘#sortable’).sortable({
update: function(event, ui) {
var newOrder = $(this).sortable(‘toArray’).toString();
$.get(‘saveSortable.php’, {order:newOrder});
}
});
});
$(‘#sortable’).sortable({
update: function(event, ui) {
var newOrder = $(this).sortable(‘toArray’).toString();
$.get(‘saveSortable.php’, {order:newOrder});
}
});
});
Answers:
1.
Removes positions from
data base based on the user input
2.
Saves
sortable positions to data base based on the user input
3.
Adding new sortable
positions from another data base
4.
Sorting out existing
positions without updating the data base with the new user inputs