It works like a charm in all browsers but IE where I get a "Type Mismatch" on this line:
// Since the element itself will change position, we have // to have some way of storing its original position in // the DOM. The easiest way is to have a 'flag' node: nextSibling = parentNode.insertBefore( document.createTextNode(''), sortElement.nextSibling );
Hey!
Thanks for this great script!
I'm sorting with:
$("PROD_CAT_SORT", xml).sortElements(function (a, b) { return parseInt($(a).text(), 10) > parseInt($(b).text(), 10) ? 1 : -1; }, function () { return this.parentNode; });
It works like a charm in all browsers but IE where I get a "Type Mismatch" on this line:
// Since the element itself will change position, we have // to have some way of storing its original position in // the DOM. The easiest way is to have a 'flag' node: nextSibling = parentNode.insertBefore( document.createTextNode(''), sortElement.nextSibling );
Any ideas?