css animation ripley - Free Download Handling CSS Based Animations Using JavaScript - ripley

Free Download Handling CSS Based Animations Using JavaScript – ripley

Posted on

This time I will share jQuery Plugin and tutorial about Handling CSS Based Animations Using JavaScript – ripley, hope it will help you in programming stack.

css animation ripley - Free Download Handling CSS Based Animations Using JavaScript - ripley
File Size: 4.84 KB
Views Total: 513
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

ripley is a super tiny JavaScript plugin to handle CSS powered animations by toggling given CSS properties with configurable easing function, transition delay, and animation speed.

How to use it:

1. Load the JavaScript ripley.js in the document (jQuery is optional).

1 <!-- As a Vanilla JS plugin -->
2 <script src="ripley.js"></script>
3 <!-- As a jQuery plugin -->
4 <script src="jquery.js"></script>
5 <script src="ripley.js"></script>

2. Initialize the plugin on the target element and define the CSS property & value for the animation.

1 // Vanilla JS
2 let rply = new Ripley(document.querySelector('#element'));
3 rply.animate('opacity', '0.25');
4  
5 // jQuery
6 $('#element').ripley('opacity', '0.25');

3. Customize the animation speed in seconds.

01 // Vanilla JS
02 let rply = new Ripley(document.querySelector('#element'));
03 rply.animate('opacity', '0.25',{
04   speed: 0.5
05 });
06  
07 // jQuery
08 $('#element').ripley('opacity', '0.25',{
09   speed: 0.5
10 });

4. Apply an easing function to the animation.

01 // Vanilla JS
02 let rply = new Ripley(document.querySelector('#element'));
03 rply.animate('opacity', '0.25',{
04   ease: 'ease-out'
05 });
06  
07 // jQuery
08 $('#element').ripley('opacity', '0.25',{
09   ease: 'ease-out'
10 });

5. Set the time to wait before triggering the animation.

01 // Vanilla JS
02 let rply = new Ripley(document.querySelector('#element'));
03 rply.animate('opacity', '0.25',{
04   delay: 0
05 });
06  
07 // jQuery
08 $('#element').ripley('opacity', '0.25',{
09   delay: 0
10 });

Changelog:

2020-04-24

  • v1.1

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