Wix Tutorial - Number Counter, using Wix Code

Add a simple number counter to your site using Wix Code.


You can change the starting number by changing startNum in the code, and change the end number by changing endNum in the code. You can also experiment with the counter speed by varying const duration.



  • Start Number: #StartNumber

Wix Code:

$w.onReady(function () {});

let startNum = 0;

let endNum = 1000;

const duration = 300;


$w.onReady(function () {

    setInterval(() => {


    }, duration);



function countUp() {

    if (startNum <= endNum) {

        $w('#StartNumber').text = startNum.toString();





Start Number

Number Counter.jpg

Websites designed by WixCreate that use the above Wix Code: