I'm using jquery sortable, along with a load of custom functions to manage a list. I have functions that trigger the sortable, but I need to change this so that those the sortable only runs if the list has changed in any way.
Is there a way of reading the whole list into a variable, so that I can later compare it with the current list?
Something like this maybe?:
var mylist=$('#myol').attr(ids);
and then later:
if(mylist != $('#myol').attr(ids)) {
$('#myol').trigger('sortupdate');
}