Socket
Book a DemoInstallSign in
Socket

jquery-ripple

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-ripple

jQuery Plugin for a ripple effect inspired by Google Material Design

latest
Source
npmnpm
Version
0.2.4
Version published
Maintainers
1
Created
Source

jQuery-ripple

A jQuery Plugin for a ripple effect inspired by Google Material Design.

Installation

jQuery-ripple can be installed through Bower.

$ bower install jquery.ripple --save

Or through npm

$ npm install jquery-ripple --save

Usage

  • Include the required jquery.ripple.css in the head section of your document.

    <link rel="stylesheet" href="bower_components/jquery-ripple/jquery.ripple.css">
    
  • Include the latest version of jQuery and jQuery-ripple in your document.

    <script src="//code.jquery.com/jquery-latest.min.js"></script>
    <script src="bower_components/jquery-ripple/jquery.ripple.js"></script>
    
  • Create an element with the [data-ripple] data attribute defined.

    <button data-ripple>Button</button>
    
  • Call the plugin on the element.

    $('[data-ripple]').ripple();
    

Customization

Optionally, you can pass a different CSS color to use for the ripple ink:

$('[data-ripple]').ripple({ color: '#EF5734' });

Events

jQuery-ripple introduces three events that you can hook into for additional functionality:

Event NameDescription
'beforeripple'Fired on touchstart/mousedown before ripple-active class is added to the DOM
'afterripple'Fired on touchend/mouseup/mouseleave before ripple-active class is removed from the DOM

Keywords

jQuery

FAQs

Package last updated on 24 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts