Two actions, one button/icon

How do you set an interaction into an icon. For example if I use a workflow on clicking an icon to expand a hidden div but then I want to use that same icon to hide the div. I am used to setting another action or workflow into that icon. What is the correct way to do it in Weweb?

You can use an if/then to determine which path you want your workflow to go down based on the value of a variable. You could use a var to store whether the div is hidden/shown, and depending on the current state, decide which actions you want the workflow to take.

Branching is a super-powerful idea in workflow building. Once you get a taste, you’ll find there’s so much more you can create and much faster than you thought possible! Introducing and managing more complicated flows is part of the hardest 5% we work on in State Change daily office hours.