I'm trying to hide an initially visible text block on mouse click, but...

jawad
jawad Community Member Posts: 73
I'm trying to hide an initially visible text block on mouse click — but don't want it reappearing when you visit the page again. Anyone know how to do this?



Thanks

Jawad

Comments

  • dampio
    dampio Community Member Posts: 7
    I would combine it with an variable.



    Try the following:

    - Do not use initially visible

    - Create an action that runs on showing the page, that shows the picture

    - Set a condition to this action, that only shows the picture, when the variable 'whatever' is set to 0

    - when clicking on the button, set the variable 'whatever' to 1 and hide the picture



    Should work fine... :-)
  • lauram
    lauram Community Member Posts: 149
    First you'll want to create a custom variable in the Variable Manager. You can name the variable something meaningful and easy to remember, like "texthidden".



    Then add a 2nd action to the button to Modify the Variable "texthidden" and set the value equal to "yes".

    On Click > Modify Variable > Target: texthidden > Type: Set Equal To > Value: yes



    Finally, add one last action to the page hide the Text Block IF texthidden = yes. You can set this using a condition.

    On Show > Hide > Text Block > Condition - Variable: texthidden, Relationship: is equal to, Value: yes
  • jawad
    jawad Community Member Posts: 73
    Cheers for that!



    Jawad