TypeError: $item(...).show is not a function

Hi,
I’m a beginner in Wix and JS. I’m trying to make simple box to show when hover over button. Its just a simple code:

export function catButton_mouseIn(event) {
 // Add your code for this event here: 
 let $item = $w.at(event.context);
$item("#menuBox").show();
}

In the code editor it shows error:
#menuBox is not a valid selector

And when I hover over the button it shows the error in the title.
Now, id of the button and box are correct. There is no mistake there. But I dont know what causes this error.
Can anyone tell me what is wrong with the code?

It’s not so clear what you’re trying to do with the $item.
Why won’t you use $w (“#menuBox”).show() ?

Because I read this at wix:
Deprecation note: The $w parameter of event handlers is being deprecated. To get a scoped selector for working with elements in repeater items, use the $w.at() function and pass it the context property of the event parameter: $item = $w.at(event.context) . To learn more, see here .

But it didn’t really matter what I used. Nothing worked. That is until I switched browser. I was using Mozzila and then I switched to Google Chrome and there it works just fine. Don’t know the reason though :thinking: