Thanks kangax, that worked well.

One question: since I'm working with dynamically-generated code, is
there some way I can concatenate variable names? For instance, this
code is working in a function, so I actually want to use an ID number
to identify #container. I've tried something like:

$$('#container_'+boxID+' span');

in order to end up with:

$$('#container_1 span');
$$('#container_2 span');
$$('#container_3 span');

but this just prints the string out literally. How can I embed the
variables in there?


On Oct 31, 4:50 pm, kangax <[EMAIL PROTECTED]> wrote:
> $$('#container span').length === $$('#container span.on').length
> // or a bit more effecient
> $$('#container span').all(function(el){ return
> el.hasClassName('on') });
> --
> kangax
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to