Hello,
The xml response from the ajax request looks like this:
<element type='type1' />
<element type='type2' />
...
<element type='type1' />
I want to insert dom elements based on the xml, but I want them to be ordered as: first all the elements of type1, then all the elements of type2.
It made sense for me (and I also read some discussions on the web) that a compound selector would do it:$(xml).find('element[type=type1], element[type=type2]').each()
. Unfortunately this still gets the element in the xml order.
Any ideas?