I want to add multiple buttons to my page. All of the buttons should trigger the same click interaction. The interaction is only affecting different elements on the page, not the button itself. All of the click interactions should have a state for the first and for the second click. Until here everything is good!
Now I want the interaction to work properly, no matter which of the button gets clicked. So if you click on Button 1 at first the first click action gets triggered. If you click on Button 2 afterwards the second click action gets triggered. If you click Button 3 after that the first click action gets triggered. And if you click Button 1 again, the second click action gets triggered.
What happens now is that every Button has its own counter, checking if it got clicked the first or the second time. What I need is one counter for all the buttons together…
Is there anybody who can help me achieve this? I hope you can understand my problem…
Thanks a lot!