I'm using tinysort plugin on jQuery and it works great.
However I would like if there is an "unsort" option, to restore the default order of my elements.
Thanks
I'm using tinysort plugin on jQuery and it works great.
However I would like if there is an "unsort" option, to restore the default order of my elements.
Thanks
My advice would be output the index of your list items (or whatever) in a hidden span and then in your undo button sort on that.
I solved in this way:
var alphaOrder = defaultOrder.clone();
and then:
defaultOrder.remove(); alphaOrder.tsort("label").each(function(i){$(this)}); tagsDiv.append(alphaOrder);
and viceversa.