Benjamin,

>>I switched to a different methodology and it sped up
>
>Can you explain what you did?  I try to give a full path to an item, ie:
>
><div id="car">
>    <div class="part"></div>
></div>
>
>$('div#car div.part')
>
>This may be off topic a bit, but I do believe we should educate people on
>the fastest way to select an object.

More information isn't always better. I'm just going to break down the first
part.

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".

A much more efficient method is just using "#car"--which says go get me the
element who's ID is "car". The browser has a native method for getting this
and this is very fast an efficient.

-Dan

Reply via email to