>       Saying "div#car" is literally saying find me all "div" tags, where
>the "id"
>       is "car". To do that, we have to first get find all DIV tags and
then
>figure
>       out which one has an id of "car".
>
>
>That's the way it worked pre 1.1. Now, it's "get #car and check if it's a
>div".

I actually thought that was the case now, but it's still faster not to
perform additional checks if not needed.

Plus, what happens if you have:

<div id="bam" />

<span id="bam" />

What if you need to retrieve the span tag? If it's checking #bam first,
won't it only find the <div /> element?

(And yes, I know the HTML spec says that IDs should be unique, but
occasionally you're dealing w/dynamically generated server content that's
out of your control.)

-Dan

Reply via email to