API

Waves.init(config)

Initialise Waves with an optional config.

Arguments

{{#code class="lang-javascript"}} var config = { // How long Waves effect duration // when it's clicked (in milliseconds) duration: 500, // Delay showing Waves effect on touch // and hide the effect if user scrolls // (0 to disable delay) (in milliseconds) delay: 200 }; // Initialise Waves with the config Waves.init(config); {{/code}}

Waves.attach(elements, classes)

Attach ripple effect by adding .waves-effect to HTML element. Make sure you call Waves.init() to activated the ripple.

Arguments

{{#code class="lang-javascript"}} // Adds .waves-effect and .waves-light to