Getting Started

Download the latest version of Waves from Github repository. You can also install it via Bower with bower install waves or via npm with npm install node-waves. Include waves.min.css and waves.min.js to your HTML file and Waves is ready to use!

{{#code class="lang-markup"}} Waves example Click Here {{/code}}

Advanced:
Waves also provide LESS, SCSS, and SASS source. So, feel free to use it :)

Attach the effect

To attach Waves's effect (or we usually called it as "the ripple") to HTML element, you can use Waves.attach()

{{#code class="lang-markup"}} Click Here {{/code}}

Waves.attach() comes with 2 parameters, the first is the DOM element that you want to be attached (or string that represent it, like jQuery), and the second one is an array of CSS classes that will be applied to the element.

{{#code class="lang-markup"}} Click Here {{/code}}

Initialize

After you've attached Waves to your HTML element, you can initialize Waves with Waves.init() to start the effect. You can also configure Waves by passing option parameter on Waves.init(). Please see API page for further information.

{{#code class="lang-markup"}} Click Here {{/code}}

Waves is designed to be flexible. It means you still be able to attach the effect to another element after Waves.init().

{{#code class="lang-markup"}} Click Here {{/code}}

Helper classes

In a couple examples above, you already see some Waves classes on Waves.attach(). Waves provide several classes to help you styling your effect. Here we go.

Quick Fix

IE Tap highlight on Windows Phone

By default if you access a web page using IE in Windows Phone, you will get tap highlight effect when you tapping a link or button and this highlight will shadowed Waves effect. To prevent this thing happen, you will need to add msapplication-tap-highlight meta tag on your header.

{{#code class="lang-markup"}} Your Web Page {{/code}}