Change thing on scroll in Wix

30. March 2021

$w.onReady(function () {
	$w('#image4').hide();

    $w('#vectorImage1').onViewportLeave(() => {
        $w('#image4').show();
        $w('#image3').hide();
    });

	$w('#vectorImage1').onViewportEnter(() => {
        $w('#image4').hide();
        $w('#image3').show();
    });
});