Re: Using $$ within an element.

Christophe Porteneuve
Mon, 04 Jun 2007 07:05:56 -0000

Mark Holton a écrit :
> Chris,
> Many thanks!  I did not know about ''first-child'' or
''>'' ... have been
> using $$(''a''), $$(''#foo''), etc for
grabbing arrays of links, divs, etc.
> ...this takes it a step further!  ...the power of Prototype is awesome.

$$(''#x'') is actually a convoluted, slower way of doing
$(''x'')...

Just look at the online ref [1], and dive into the CSS3 Selectors [2]
spec.  Plenty of jewels in there.

[1] http://prototypejs.org/api/utility/dollar-dollar
[2] http://www.w3.org/TR/css3-selectors/