Hi, > > > ID should be uniqe over the page, so div#myid is redundant. > > [...] > > I know that. My point is that there should not be two elements with same id > on the page. At least, I'm developing like that.
But that doesn't make the expression div#myid redundant. Of course the id should be unique, but div#myid has another meaning than #myid. That's why it isn't worthless as Jake said. It even isn't worthless measuring the difference, because div#myid needs to check if the element returned by getElementById() is a div. As Karls results show, there is a noticable difference here. As far as I can judge it, Karls results suggest, that jQuery uses getElementsByTagName() and then search the result for the id. I guess it would be faster to do it the other way round. Christof _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/