Expanding and Collapsing Strips with Button Issues

Hi!

I’m trying to create a page where logos act as buttons in that when you click them they open strips with more information about the organization. My thought was I’d setup strips with show/hide and expand/collapse commands.

Currently I have two test logo “buttons” that open their own strips when you click on them, but I have a plan text “button” that says “close” that needs to be used to close the strip.

I have a few questions:

  1. The close button for the first strip that was working before the addition of the second strip no longer works now that I’ve added the second strip. The strip opens when the logo is clicked as it’s supposed to, but doesn’t hide/collapse when clicked. The same exact code (other than naming of the elements) is applied to a button on the second strip, and it closes fine.

  2. Is there a way to tell the strip to close when another logo “button” is selected? I don’t want the user to be able to open multiple strips at a time.

Here’s my current code:

export function LOGO1_click(event) {
$w(‘#STRIP1’).expand();
$w(‘#STRIP1’).show();
}

export function STRIP1closebutton_click(event) {
$w(‘#STRIP1’).collapse();
$w(‘#STRIP1’).hide();
}

export function LOGO2_click(event) {
$w(‘#STRIP2’).expand();
$w(‘#STRIP2’).show();
}

export function STRIP2closebutton_click(event) {
$w(‘#STRIP2’).hide();
$w(‘#STRIP2’).collapse();
}

Thanks for any help in advance!