Menu

Blink

Makes an element blink.

Example

Add yoi-action="Blink:#id;" to make an element blink. By default, it blinks two times:

<!-- example -->
<button class="button button--large" yoi-action="Blink:#example-1;">Blink</button>
<div id="example-1" class="box p-4 m-t-4 fs-2">This will blink two times.</div>

Parent and Self Use the keyword parent to target the parent (=sourrounding) element. Use the keyword self to target the element itself.

Parameters

on Optional – a valid event (learn more). The default event is click.
trigger Optional – the trigger element to listen to (learn more).
times Oprional - the number of times the animation will play. The default value is 2.

Times

Add the parameter times to define how many times the blink animation plays:

<!-- example -->
<button class="button button--large" yoi-action="Blink:#example-2; times:4;">Blink Four Times</button>
<div id="example-2" class="box p-4 m-t-4 fs-2">This will blink four times.</div>

Events

This action does not fire any event.

Source Files

actions/blink.js