Greetings,
I have a general inquiry for the core dev guys...  I noticed today
while running a selector that comma separated selectors build their
results by order of the selector and not by order they appear within
the originating DOM.  What I mean is, if I am running a selector that
has say two different classes and I want nodes for both (ie.
div.classOne and div.classTwo) I might run $
(start).find('div.classOne, div.classTwo).  My expectation when I did
this was that returned nodes would come in order of their appearance
in the DOM, but instead the children matching div.classOne are found,
and then the children for div.classTwo are found afterwards, even
though they might appear in an order like this for example:
[div.classOne, div.classTwo, div.classOne, div.classOne,
div.classTwo].  What is the rationale behind running these selectors
this way?  Is this something that could be altered with a different
syntax via a plugin or something like that?  The only reason I even
noticed this is because I ran the results through $.each() and needed
to deal with the nodes in their appearance.  I wound up figuring out a
work around in the end for my particular situation, but this struck me
as worth inquiring about.

Anyhow, thanks in advance for any responses/replies/feedback on this
one.

Pax,
- Stan Lemon


Reply via email to