Click -> hide something, double-click -> show it again

So, I have the red group and the grey group.

When I click the red group I want to hide the grey group, when I double click I want to show it again, and so on.

I can do only the first step? How can I do the rest?

I think I found a solution.

  1. Go to Workflow → Add event → red Group is Clicked
  2. Add Action → Set state.
  • Element → click (name of page)
  • custom state. create a new custom state with type = number, name = “number of clicks”.
  • value = “number of clicks” + 1
  1. go to the design tab under the grey group, and put the following conditionals
    image

Hi!

Create a “double-click” button is something that will require some work… I never needed one, so I decided to take the chalange to build one… :facepunch:

Here is how I made it:

  1. I created a group called “Group A” to be my button and an icon called “Robot” to be the image that will be displayed or hidden according to what you expect.

image

  1. I also created another group, inside the “Group A”, called “Group B”.

image

  1. Now, the logic:

When I cick in “Group A” I hide the icon.
When I click in “Group B” I show the icon.

So, “Group B” can only be visible for a few mileseconds after I click in the “Group A”, to simulate the second click. So, if I be able to click in the “Group B” while it is visible it means that I made two clicks, one after other. So, how I did it?

  1. Workflow:

Note that after I click in the “Group A” I hide the icon and show “Group B” for 200 mileseconds. It is very very fast… After this time, I hide it again.

image

Now, important things:

  1. Make “Group B” the same size of “Group A”.
  2. Make “Gruop B” with transparent background, so it will not be visible while displayed.
  3. "Group B"can not be visible on page load.

Hope it help!

2 Likes

This is not going to work as a “double-click”. :roll_eyes:
If you keep clicking, you will keep adding +1 to your custom state and the group will keep been displayed and hidden thru single clicks…

Might want to try this using simple Jquery with just 2 actions, free, works for mobile and stable.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.