slot-rolling-number
v1.0.5
Published
A customized slot-machine-style rolling number tool for web pages.
Downloads
3
Readme
Usage:
- put HTML element in your page:
- import rollingNumberCreator from 'package'
- init instance: let rollingNumberInstance = rollingNumberCreator();
- create rolling number: rollingNumberInstance.default({ el: document.getElementById('digit'), from: '?', to: '1', animationDelay: 0 })
- please note: I changed some variables in the original file, see comments in index.js, if animationDelay is not 0, there will be blinks at the start and the end of the animation. If there is any other character you want you roll, find u = "?0123456789" and include them.
Example: