Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE type mismatch #5

Open
kaaelhaa opened this issue May 1, 2011 · 0 comments
Open

IE type mismatch #5

kaaelhaa opened this issue May 1, 2011 · 0 comments

Comments

@kaaelhaa
Copy link

kaaelhaa commented May 1, 2011

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant