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":
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
[email protected]
http://jquery.com/discuss/