<div class="statistics-card-wrapper">
<div class="statistics-card">
<p class="statistics-card-title">Операции при запущенных опухолях малого таза (экзентерации, эвисцерации)</p>
<p class="statistics-card-number"><span class="js-stat-number">60</span></p>
</div>
</div>
if($('*').is('.js-stat-number')) {
$('.js-stat-number').each(function() {
$(this).prop('Counter',0).animate({
Counter: $(this).text()
}, {
duration: 7000,
easing: 'swing',
step: function(now) {
$(this).text(Math.ceil(now));
}
})
});
}
if($('*').is('.js-stat-number')) {
$('.js-stat-number').each(function() {
var number = $(this).text();
var counter;
if (number.length < 4) {
counter = 0;
} else {
counter = number.slice(0, number.length - 3) + '000';
}
$(this).prop('Counter', counter).animate({
Counter: $(this).text()
}, {
duration: 6000,
easing: 'swing',
step: function(now) {
$(this).text(Math.ceil(now));
}
})
});
}