Upvote 2

Show and Hide an object on click

Answered Victor Conesa 11 years ago

I'm trying to do something real simple and basic, but I can't figure out how to do it. I cannot find an easy-to-understand explanation of how to do it in the Justinmind user guide or online tutorials!


Situation:


I have a rich text shape. And I have a hidden grouped object.


On click of that text shape, I would like a hidden grouped object to appear (show). When user clicks the block of text again, I would like the grouped object to disappear again (hide).


In other words: I'm simulating the kind of behavior you'd see with a dropdown pane I want to show/hide an object on click.


Using the interactions popup, I am able to accomplish part 1: I can make the hidden object appear when I click on the trigger. But I cannot figure out how to do part 2: make the hidden object disappear when I click on the trigger again.


I am using version 5.1.0.


Can you please give me an easy-to-understand explanation of how to create a show/hide interaction, with screenshots?


p.s. I tried messing around with the Expression Builder to see if I can create a condition that says to change the object back to hidden (on click) if its current status is visible, but I can't figure out how to build an expression like that.

Best Answer
photo

Create an "On Toggle" + "Show" event.

Replies (2)
photo
1

Try using the 'on toggle' event instead of the 'on click'

photo
1

Create an "On Toggle" + "Show" event.

Leave a Comment
 
Attach a file