Effect.Opacity

This effect changes an element’s opacity (transparency).

Availability

script.aculo.us V1.0 and later.

Syntax

new Effect.Opacity('id_of_element', [options]);

new Effect.Opacity(element, [options]);

Examples

new Effect.Opacity('id_of_element', {duration:0.5, from:1.0, to:0.7});

Will fade the element from 100% to 70% over the space of 1/2 second.

Notes

Microsoft Internet Explorer can only set opacity on elements that have a ‘layout’ (see Giving Elements Layout).