tags:

views:

709

answers:

2

Does YUI have selector methods like jQuery?

e.g. get me all div's that are children of that have links in them?

+4  A: 

Check the YUI Selector Utility, it gives you CSS3 selector sintax, it still in beta but works quite well, check this example: YAHOO.util.Selector.query

CMS
+5  A: 

YUI 3 (currently in preview release) has explicitly JQuery-like selectors:

Y.all('.foo').set('title', 'Go!').removeClass('off');

Take a look at:

I've gotten good results using YUI 3 Preview Release 1 on OffsetConsumer.org, a website I'm working on; the next YUI 3 preview release is scheduled to come out in November.

Anirvan