views:

44

answers:

1

Hi Guys,

Just trying to establish whether prototype can do something like

$$('#ID a:last').css('color','#111');

Any ideas ?

A: 

The syntax is:

$$('#ID a:last')[0].setStyle('color','#111');

(In prototype $$ returns an array - so if you know there is just one, take the first)

hope this helps

plodder
hey thanks - yeah i had to set it to$$('#ID a:last')[1].setStyle('color','#111');this worked
Tom