spinteger
v1.0.3
Published
Animated spinning numbers
Downloads
3
Maintainers
Readme
Installation
$ npm install spinteger --save
$ bower install spinteger --save
or use CDN
<script src="http://spinteger.io/dist/spinteger.min.js"></script>
Usage
<script src="bower_components/spinteger/dist/spinteger.min.js"></script>
import spinteger from 'spinteger'
var spinNumber = spinteger(document.querySelection('#number'));
spinNumber.val(1230329) // any number
Examples
<span id="number">1873656</span>
var num = spinteger(document.querySelector('#number'),{
fontSize: 40, // Default: inherit or 16px
separator: '#', // Default: ''
tofixed: 2, // Default: 0
step: 2, // Default: 1
speed: 100, // Default: 50
before: '$', // Default: ''
after: '$' // Default: ''
});
num.val(3892382);