Number Counting Animation
Wed Oct 19 2022 03:24:12 GMT+0000 (Coordinated Universal Time)
Saved by
@dwtut
#javascript
if(SDB.App.exists('body:not(.fl-builder-edit) #cc-counter')){
76
var a = 0;
77
$(window).scroll(function() {
78
79
var oTop = $('#cc-counter').offset().top - window.innerHeight;
80
if (a == 0 && $(window).scrollTop() > oTop) {
81
$('.counter-value').each(function() {
82
var $this = $(this),
83
countTo = $this.attr('data-count');
84
$({
85
countNum: $this.text()
86
}).animate({
87
countNum: countTo
88
},
89
90
{
91
92
duration: 2000,
93
easing: 'swing',
94
step: function() {
95
$this.text(Math.floor(this.countNum));
96
},
content_copyCOPY
https://www.conceptsconveyed.com/
Comments