Hi,
I´m trying to do a Number Counter Style and i made it with no problem.
Here is the counter JS script → CountUp.js
And here is the script that i used:
<script src="https://dl.dropboxusercontent.com/s/w7mixg6fj0lbn71/countUp.min.js"></script>
<script>
var c1 = new countUp("c1", 0, 98, 0, 6);
var c2 = new countUp("c2", 0, 1532, 0, 6);
var c3 = new countUp("c3", 0, 85, 0, 6);
var c4 = new countUp("c4", 0, 321, 0, 6);
window.onload = function() {
c1.start();
c2.start();
c3.start();
c4.start();
}
</script>
So far so good, the problem is the container is on the bottom of the page and the user has to do scroll to see it and when the user see it the “effect” is gone.
My question is, is there a way to when i scroll and the item is on 50% of the screen, the JS file start´s working?
tks
Rui