Hi,

> If you want to keep performance, maybe it's better to do:
>
> if( $("#myid").is('div.myclass')) alert("YEAH, WE GOT IT");
> else alert("Ha, my ID is misused!!");

Yes, of course. If I whant to use jQuery methods I could also use filter():

$('#myid').filter('div.myclass').addClass('hereWeGo');

But I think that it would be good if people didn't have to think about 
alternative constructs for performance reasons. I know it isn't always 
possible, but I think, the library should do its best to optimize queries. 
jQuery is not bad here, but there is still some room for improvements.

My original point was to show, that it is not "worthless", as Jake wrote, to 
use queries like 'div#myid'.

Christof

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

Reply via email to