Hey Guys, it might be trival but I need some help with two functions. I am using a small JS to toggle a class on some Hype objects (see the attached stripped down scene from my project). It is working nicely, but I am unable to achive two features:
– I would like to have only one active object at a time. So if I click on button2, the blue circle of button1 should be closed (if it is open). Same for button3 etc… If I click outside of one of the buttons, all the circles should be closed. Hope this is making sense…
– I am seraching for a way to apply the class named “pulse” randomly to the buttons (for 1 or 2 sec.). Or apply it in order to the buttons (2sec for button1 after that 2sec for button2 etc.).
Help is highly appreciated – and sorry once again for all this newbish questions. I know I SHOULD learn JS
popup.hype.zip (50.6 KB)