views:

479

answers:

2

This is probably really simple, but the prototype docs on the $$(function) really suck. What do I DO with all the items once the function gives them to me?

First I tried:

$$('div.category').style.height = 400 +"px";

Then:

$$('div.category').each(.style.height = 400 +"px");

Finally:

for (x in $$('div.category'))
{
    x.style.height = 400 +"px";
}

None of them are working. Help?

+1  A: 
$$('div.category').each(function(d){
    d.style.height = '400px';
});
J-P
There we go! Thanks.
cksubs
+1  A: 

$$('div.category').invoke('setStyle', { height: '400px' });

Read more on invoke.

Christian