Help for onReady function

Hello Andrea,

First of all, here is the code that you need:

$w("#yourItemId").onMouseIn((event) => {
    //write your code here (what will happen after onMouseIn event)
})

or

$w.onReady(function () {
    $w("#yourItemId").onMouseIn((event) => {
        //write your code here (what will happen after onMouseIn event)
    })
})

onReady function is triggering when your page is ready (loaded) so when you write a code inside this function it means your function will be fired after the page loaded.

For your event listener (onMouseIn is an event listener) you can put this code inside onReady. But you don’t have to put every code into onReady.