I’m having the same problem.
I have a column strip at the end of the page (columnStrip6) with four animated numbers that count up.
I’ve tried creating an onViewportEnter event from properties panel and then inserting the Count Up codes below it, so that the animation only begins when columnStrip6 has entered the viewport. This doesn’t seem to work.
Could someone help us out? This is the code I’m using (and doesn’t work):
export function columnStrip6_viewportEnter(event, $w) {
let startNum = 0;
let endNum = 200;
const duration = 75;
$w.onReady(function () {
setInterval(()=> {
countUp();
}, duration);
});
function countUp(){
if (startNum <= endNum ){
$w(’ #text19 ').text = startNum.toString();
startNum++;
}}
}
Thank you so much!