2006/12/19, Christof Donat <[EMAIL PROTECTED]>:
Hi, > ID should be uniqe over the page, so div#myid is redundant. No, it isn't. It should return an empty jQuery-Object in case the Element with the id "myid" is not a div. That is usefull when you produce your Content dynamically (e.g. with PHP). The same is true for .myclass#myid, or even div.myclass#myid which should return the element with the id "myid" only if it is a div and has the class "myclass":
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. if( $("div.myclass#myid").length > 0 ) alert("YEAH, WE GOT IT");
else if( $("#myid").length > 0 ) alert("Ha, my ID is misused!!"); Christof _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
-- Dragan Krstić krdr http://krdr.ebloggy.com/
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/