Unable to make button hide one element AND show another hidden element

I am trying to have one button simultaneously hide one element while opening another element. However, it is only able to do the hide and unable to do the show when both lines of code are present.

So I am trying to make button2 hide box2 while showing box3. box3 is set in properties to hide on load (checked “hidden” for default values). This is the code I’m trying to use to do that:

$w('#button1').onClick((event) => {
        $w('#box2').hide();
        $w('#box3').show();

})

However, it is only making box2 hide and not making box3 show up. However, when it only has the code to make box3 show it does it fine (see below).

$w('#button1').onClick((event) => {
        $w('#box3').show();

})

As longs as the line for hiding box2 is on there though, it only does that and doesn’t make box3 show. I tried changing the orders of the two (show first, hide second), doing a separate thing altogether for each action, etc. but no matter what, as long as the line for hiding box2 is on there, it only does that and won’t show box3.

Hi, @phxpcky !!

That’s odd. :upside_down_face: I followed the same steps, but everything seems to be working fine for me. :thinking: