btw, I just added a text input so you can run whatever query you want on the page. just type in the selector -- without $() -- and press the Test! button.

In case anyone wants to try but has lost the thread, here is the URL again:
http://test.learningjquery.com/speed-test.htm

On Dec 19, 2006, at 11:31 AM, Dragan Krstic wrote:
Dragan,
I think what Christof is getting at is this: on any given page, #myid could be uniquely assigned to a div or a paragraph or a span or an image or any other element. So, page 1 could have <div id="myid"></div> and page 2 could have <p id="myid"></p>

If the same script is being included on multiple pages, it might be necessary to specify that an event take place only if #myid is attached to, for example, the div. In this scenario, div#myid is not redundant.

But that is bad practice. I'll never use same id for different tag in app. Ah, you never know...

As you say, you never know. ;-) We often don't have total control over markup, and I for one would have a much harder time justifying to bosses/clients time spent making each ID refer to a single tag throughout a site than, say, fixing a page that has the same ID applied to more than one element.

On Dec 19, 2006, at 11:13 AM, Stephen Woodbridge wrote:
OK, here is an interesting tidbit.

I used the test below and and did the 7 click thing, and out of all my
tests except one, the long delay happened in has() and once I got it in find(). has() is pretty simple and I wonder if this has less to do with the number of clicks versus the number of regex's we use and dispose or
something like that.

very interesting, indeed. Might be worth someone looking into?

I love testing!!! It makes one look at what is happening and sometimes
you are surprised! but the questions and introspection are always good
on occasion.

Yes, well put!



--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to