Wix code not working on Safari and Chrome

Hi, I am working on a project for my client. The task is to integrate a map as a picture with a legend. When you hover on the names of the legend (created as buttons), a location button shall appear within in the map.

So I have written the following code:

export function buttonFasanenhof_mouseIn(event) {
$w( “#buttonLocationFasanenhof” ).show();
}
export function buttonFasanenhof_mouseOut(event) {
$w( “#buttonLocationFasanenhof” ).hide();
}

I have a similar problem with multistatus boxes used for a FAQ section that expand and collapse:
export function readMoreButton2_click(event) {
$w( “#stateboxFAQ2” ).changeState( “expandedState2” );
}
export function readLessButton2_click(event) {
$w( “#stateboxFAQ2” ).changeState( “collapsedState2” );
}

Both function work perfectly fine on Firefox, but none of them work in Chrome and Safari. Can somebody help with this issue? Thanks!

Katharina

Debug to check if the click/mouse event is getting fired.
Put console.log() on each event.
If fired the issue is on elements methods.
If not the issue is the element event.

Hi mvveiga,

Thanks for the hint. I am newbie to debugging. Can you walk me to the steps where I can do this? The console only says this and tbh I don’t really what to do.

Debug is logging msg on console panel.
I.E
export function buttonFasanenhof_mouseIn(event) {
console.log(“buttonFasanenhof_mouseIn(event) FIRED”);
$w( " #buttonLocationFasanenhof " ).show();
}

The msg will be in console on mousein event.
Preview the site and expand the bottom panel so watch the msg.