Code snippets for symfony 1.x


Refine Tags

Snippets tagged "scriptaculous"

visual_effect('highlight') transition colors / visual_effect parameters

(note: you can look up the options for the other various visual_effects from the wiki tags page. Their usage is identical to this example.)

visual_effect('highlight', 'vendor',
array('startcolor' => "'#000000'", 'endcolor' => "'#ffffff'", 'restorecolor' => "'#FF0000'")))

simple, but has a few caveats:

-if you dont enclose the quotes with the color params, the js function color isnt quoted, and the highlight wont occur.

-i found behavior inconsistent without using 6 character RGB values (e.g., #000 didnt work).

-restorecolor can be omitted, but non web-safe colors wont always be restored to the original background color.

passing an options array works for any of the visual_effect() aliases.

by eric williams on 2006-07-07, tagged ajax  highlight  scriptaculous  visualeffect