This effect changes the CSS properties of an element.
Style as a hash (keys should be javascript names, rather than CSS ones i.e. ‘backgroundColor’ rather than ‘background-color’):
Effect-specific paramters
Option Description
style the target style of your element, writing with the standard CSS syntax, or as a hash
[url]http://wiki.script.aculo.us/scriptaculous/show/Effect.Morph[/url]
Simple :
$('morph_example').morph('background:#080;color:#fff');
Complex :
new Effect.Morph('error_message',{
style:'background:#f00; color:#fff;'+
'border: 20px solid #f88; font-size:2em',
duration:0.8
});
Style as a hash (keys should be javascript names, rather than CSS ones i.e. ‘backgroundColor’ rather than ‘background-color’):
Effect-specific paramters
Option Description
style the target style of your element, writing with the standard CSS syntax, or as a hash
[url]http://wiki.script.aculo.us/scriptaculous/show/Effect.Morph[/url]