digimate

2.1.6 • Public • Published

DigiMate

DigiMate is a jQuery.animate() wrapper that allows it work on variables or what ever you can add inside the step callback.

Getting Started

Install

npm install digimate

Prerequisites

It, currently requires a DOM (browser) due to jQuery dependency.

Sample

import digimate from 'digimate';
 
var target = 0; // We will animate this to count from 20 to 100 in 5 seconds.
var end = 100; // This will used as the end value;
var options = {
start: 20, // Starting value, defaults to zero if omitted
duration: 5000, // Duration, defaults to zero if omitted
}
 
digimate(end, options, function(val){
// This function will be called everytime the value is updated
target = val; // Sets target value to the current step value
console.log(target); // Log the current value in the console
});

Dependency

Authors

  • Jan Mykhail Hasselbring - Sole Author at the moment

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Thanks to the authors of jQuery that coded the core of this module in the first place

Readme

Keywords

none

Package Sidebar

Install

npm i digimate

Weekly Downloads

1

Version

2.1.6

License

MIT

Unpacked Size

3.23 kB

Total Files

4

Last publish

Collaborators

  • j.hasselbring