The number is animating immediately after page is loaded. I don't want to animate it until the page is scrolled to that number's div. Here is my jsfiddle work on it https://jsfiddle.net/sagartt/cvv8sw4q
and code is
<div class="countff">
<span class="Count">15</span>
<p style="margin-left: 30px;">+</p>
<p>COUNTRIES</p>
</div>
<div class="countf">
<span class="Count" style="left:60px;">250</span>
<p style="margin-left: 30px;">+</p>
<p>ARTISANS</p>
</div>
<div class="countf">
<span class="Count">23</span>
<p style="margin-left: 30px;">+</p>
<P>EXPERIENCE</P>
</div>
<div class="countf">
<span class="Count" style="left:30px;">6000</span>
<P style="margin-left: 30px;position: relative;
left: 20px;">Sq.ft</P>
<P>STUDIO</P>
</div>
.countff {
margin-top: 400px;
}
<script>
jQuery(document).ready(function() {
jQuery('.Count').each(function() {
var jQuerythis = $(this);
jQuery({
Counter: 0
}).animate({
Counter: jQuerythis.text()
}, {
duration: 1000,
easing: 'swing',
step: function() {
jQuerythis.text(Math.ceil(this.Counter));
}
});
});
})
</script>