Effect.Pulsate

Combination Effects > Effect.Pulsate

Pulsates the element, loops over five times over fading out and in.

Examples


Effect.Pulsate('id_of_element');
Effect.Pulsate('id_of_element', { pulses: 5, duration: 1.5 });

Options

Option Description
duration float value, in seconds, defaults to 2.0
from float value, defaults to 0.0, the minimal opacity during the pulsate, in a value between 0.0 and 1.0. For example, use 0.7 for a mild pulsate
pulses integer value, defaults to 5, the amount of pulses within the duration time

Notes

Works safely with most HTML elements, except table rows, table bodies and table heads.

Microsoft Internet Explorer can only set opacity on elements that have ‘layout’. To let an element have layout, you must set some CSS positional properties, like width or height. See Giving Elements Layout.

In Firefox, at least, if the element that you Pulsate has a :hover CSS psuedo class and you mouse over it while it’s pulsating, the effect will stop.

Demo

Source code of this demo


<div id="pulsate_demo" style="width:150px; height:40px; background:#ccc; text-align:center;">
  <a href="#" onclick="Effect.Pulsate('pulsate_demo'); return false;" style="line-height:40px;">Click me to pulsate!</a>
</div>