Hi community,
I’ve implemented this Odometer (Odometer — Transition numbers with ease) on one of my index pages. It’s working fine with this script:
<link rel="stylesheet" href="http://github.hubspot.com/odometer/themes/odometer-theme-default.css" />
<script src="http://github.hubspot.com/odometer/odometer.js"></script>
<script>
setTimeout(function(){
sectionone.innerHTML = 789;
}, 1000);
setTimeout(function(){
sectiontwo.innerHTML = 459;
}, 1000);
setTimeout(function(){
sectionthree.innerHTML = 459;
}, 1000);
</script>
<style>
.odometer {
font-size: 100px;
font-family: Poppins,sans-serif;
font-weight: bold;
}
</style>
My problem is that the script loads and runs when the site is loaded but want I really what to achieve is that the script runs when the visitors reaches a certain section while scrolling the page.
Is there anyone who could help me with this?
Kind regards,
Linus