Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Counter Up Plugin [very easy and simple plugin, just this code is insert in js file and add html]
- $('.counter').each(function() {
- var $this = $(this),
- countTo = $this.attr('data-count');
- $({ countNum: $this.text()}).animate({
- countNum: countTo
- },
- {
- duration: 8000,
- easing:'linear',
- step: function() {
- $this.text(Math.floor(this.countNum));
- },
- complete: function() {
- $this.text(this.countNum);
- //alert('finished');
- }
- });
- // use in html
- <h1 class="counter" data-count="110">0</h1>
Add Comment
Please, Sign In to add comment