Last active
March 31, 2016 07:47
-
-
Save tombruijn/6134393 to your computer and use it in GitHub Desktop.
Counter.js example configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#counter").counter({ | |
autoStart: false, // true/false, default: true | |
duration: 5000, // milliseconds, default: 1500 | |
countFrom: 10, // start counting at this number, default: 0 | |
countTo: 30, // count to this number, default: 0 | |
runOnce: true, // only run the counter once, default: false | |
placeholder: "?", // replace the number with this before counting, | |
// most useful with autoStart: false. default: undefined | |
easing: "easeOutCubic", // see http://gsgd.co.uk/sandbox/jquery/easing | |
// for all available effects, see visual examples: | |
// http://easings.net | |
// default: "easeOutQuad" | |
onStart: function() {}, // callback on start of the counting | |
onComplete: function() {}, // callback on completion of the counting | |
numberFormatter: // function used to format the displayed numbers. | |
function(number) { | |
return "$ " + number; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment