'JS export function case a or case b

I am working on a pop-up menu that should pop up when the user hovers over a button. I am not completely new to coding, however I am pretty rusty.

I have written the following code so far - but it doesn't really work:

export function button45_mouseIn(event) {
  $w("#box8").show();
}

export function button45_mouseOut(event) {
  $w("#box8").hide();
}

export function box8_mouseIn(event) {
  $w("#box8").show();
}

export function box8_mouseOut(event) {
  $w("#box8").hide();
}

button45 = The button over which the user hovers | box8 = The box with the pop-up menu

My idea was a code like "export function button45_mouseIn(event) OR / AND box8_mouseIn(event) → $w('#box8').show()" Can someone write me a full short code directly there or has a better idea / a better full short code?

I am really happy and thank you in advance about/for any answer!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source