Need help with Multi Number Count Up Effect

Can I know what’s wrong in the below code ?
For some reason the numbers are not counting on loading

$w.onReady(function() {

	function countElement(element, startValue, endValue, prefix = "", suffix = "") {
		 
			 const duration = 2000;
		 	 const increment = (endValue - startValue) / (duration / 20);
		 	 let currentValue = startValue;
	
		 	 const timer = setInterval(() => {
				 currentValue += increment;
				 $w(element).text = prefix + `${(Math.round(currentValue)).toLocaleString('en-US')}${suffix}`;
		
				 if (currentValue >= endValue) {
					 clearInterval(timer);
				 }
			 }, 20);
	 	 }

		$w('#startCounting').onViewportEnter(async () => {
			await countElement("#numberOne", 0, 10,"","");
			await countElement("#numberTwo", 0, 500,"","+");
			await countElement("#numberThree", 15000, 20000,"$","");

		})

});

@Paxal_Shrimal I’ve just tested in my own site, copying and pasting the code you have and it seems to be working correctly.

I added 3 text elements and set their IDs as the IDs you’re passing into the function. I’d double check that you’ve given the text elements on the page the IDs numberOne, numberTwo, number3.

If it’s still not working, let me know :slight_smile: