Changing the color of :highlight

Is there an easy way to change to color of the :highlight effect?

:complete => visual_effect(:highlight, “targetid”, :duration => 1)

thanks

On 09 May 2006, at 21:41, Ben wrote:

Is there an easy way to change to color of the :highlight effect?

:complete => visual_effect(:highlight, “targetid”, :duration => 1)

:complete => visual_effect(:highlight, “targetid”, :duration =>
1, :startcolor => “#88ff88”, :endcolor => “#114411”)

Best regards

Peter De Berdt

Thanks Peter, but I can’t seem to get that to work. The ajax works as
planned, but then there is no highlight at all.

On 09 May 2006, at 22:22, Ben wrote:

Thanks Peter, but I can’t seem to get that to work. The ajax works as
planned, but then there is no highlight at all.

Maybe you should put curly braces {} around all parameters after the
targetid.

Best regards

Peter De Berdt

Element.highlight which is what the RJS eventually gets translated to
tries to figure out the background colour of the element who’s id you
pass in. If in can’t figure it out then you have to explicitly set the
colour of the background using CSS for the target element.

Cheers

Jonathan

http://www.agileevolved.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs