I\'m using JQuery Sortable. I\'d like to know if it\'s possible to, after a number of resortings, restore the sortable control back to its original state similar to a form reset
You can cache a copy of the parent on document ready and restore it on reset.
For example, if
is your sortable element:
var sortableCache;
$(document).ready(function() {
...
$('ul.parent').sortable({ ... });
...
sortableCache = $('ul.parent').clone(true);
});
On reset, you can do:
$('ul.parent').replaceWith(sortableCache);