Make content appear or hide based on buttons

aschultze6968
aschultze6968 Community Member Posts: 5
Hi all,

I am stumped and would appreciate some guidance on the following scenario.

So I have multiple buttons on a page, each has an associated image and text. When a button is clicked its corresponding text/image appears. When another button is clicked it's image/text needs to appear while the previously clicked button's image/text needs to disappear.  Not sure how to make this conditional disappearing act occur.

Thanks,

Alex

 

 

Comments

  • timk
    timk Community Member Posts: 1,245 ✭ Legend ✭
    No condition needed here, just make each button hide everything before it shows its own elements. If you group all elements you can hide everything with a single action.
  • aschultze6968
    aschultze6968 Community Member Posts: 5
    Tim,

    The part I'm getting hung up on is how the the previously clicked button's content is "told to disappear" when a new button is clicked.

    -Alex
  • timk
    timk Community Member Posts: 1,245 ✭ Legend ✭
    With actions of course ;-)

    Select the textfields and images of all buttons in the title explorer (left pane), right-click and select "Group". Give the group a name, e.g. "Content". Add the same action to each button: Hide > Group "Content"

    Below that add the actions to show the respective elements