I have an interactive map with pins on it for the locations, 10 in total, but more to come. Each location has his own box (with the address of the location) that appears when hovering over one of the pins. If one box is displayed, I want the other boxes not to be visible.
So I use this code:
export function PinBox1_mouseIn ( event ) {
$w ( ‘#Box1’ ). show ();
$w ( ‘#Box2’ ). hide ();
$w ( ‘#Box3’ ). hide ();
}
export function PinBox2_mouseIn ( event ) {
$w ( ‘#Box2’ ). show ();
$w ( ‘#Box1’ ). hide ();
$w ( ‘#Box3’ ). hide ();
}
export function PinBox3_mouseIn ( event ) {
$w ( ‘#Box3’ ). show ();
$w ( ‘#Box1’ ). hide ();
$w ( ‘#Box2’ ). hide ();
}
It’s straight forward and simple. But for every box to show I have to type the code for 9 other boxes to hide.
Is there a code I can use that tells to hide all the other boxes at once?
For example: $w ( ‘#Box’ ). hide-all ();
I’m not very experienced with code so let me know if I’m not clear enough.
T H A N K S !