I’m trying to use JavaScript to make a Wix object follow my cursor, but it doesn’t seem to be working? It says it cannot read “addEventListener”…
Here’s my script:
var cursor = $w( ‘#vectorImage1’ );
$w.document.addEventListener( ‘mousemove’ , function (e){
var x = e.ClientX;
var y = e.ClientY;
cursor.style.left = x + “px” ;
cursor.style.top = y + “py” ;
})