Configurable Material Ripple Tap Effect - jQuery touch-ripple

Configurable Material Ripple Tap Effect - jQuery touch-ripple

The touch-ripple jQuery plugin creates a customizable Material Design ripple animation as you tap a clickable element on touch devices.

The plugin can not work with the 'Click' event. Run the example on the mobile devices or in the browser's dev tool.

1. Include jQuery library and the jQuery touch-ripple plugin's script on the page when needed.

<script src="" 
<script src="touch-ripple.js"></script>

2. Initialize the plugin on the whole document and we're ready to go.


3. Add the CSS class ripple to any clickable/tappable element within the document.

<div class="ripple">
  Tap Me!

4. Customize the ripple animation by overriding the default plugin settings as displayed below:

  // opacity (0-1)
  opacity: 0.4,
  // background color
  background: 'currentColor',
  // selector
  selector: '.ripple',
  // exclude selector
  excludeSelector: '.no-ripple',
  // default classes
  rippleOnClass: 'ripple-on',
  rippleCircleClass: 'ripple-circle',
  // data attributes
  opacityDataName: 'ripple-opacity',
  backgroundDataName: 'ripple-background',
  expanseDelayDataName: 'ripple-expanse-delay',
  // delay in milliseconds
  expanseDelay: 0,
  // duration in milliseconds
  expanseDuration: 175,
  // easing
  expanseEasing: 'linear',
  // duration in milliseconds
  fadeDuration: 175,
  // easing
  fadeEasing: 'linear'

5. You can also customize the opacity, delay, background color of the ripple animation using the following data attributes:

<div class="ripple" 
     Tap Me!

This awesome jQuery plugin is developed by topvisor. For more Advanced Usages, please check the demo page or visit the official website.

  • Publication date: 16.06.2018
  • Source