inital commit
This commit is contained in:
24
public/plugins/increment-numeric-counter/counter.js
Normal file
24
public/plugins/increment-numeric-counter/counter.js
Normal file
@@ -0,0 +1,24 @@
|
||||
$(document).ready(function(){
|
||||
|
||||
$('.counter').each(function() {
|
||||
var $this = $(this),
|
||||
countTo = $this.attr('data-count');
|
||||
|
||||
$({ countNum: $this.text()}).animate({
|
||||
countNum: countTo
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
duration: 3000,
|
||||
easing:'linear',
|
||||
step: function() {
|
||||
$this.text(Math.floor(this.countNum));
|
||||
},
|
||||
complete: function() {
|
||||
$this.text(this.countNum);
|
||||
//alert('finished');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user