+ 1

J.S. can you make something happen if user clicks this before clicking a the other...

J.S. If I had two buttons, (A, B). If user clicks B before clicking A, something happens. But if u click B then A, nothing really happens. Can we also do that in DOM? If yes can someone code a quick code, to do the above? ___Thx

15th Jun 2019, 7:57 PM
Ginfio
Ginfio - avatar
2 odpowiedzi
+ 2
If I read it well, you wanted a 2 buttons, and if you press 1 after the other, you want something to happen. In this code, if you press A then B, it will run an action, then resets. If You press A twice, then B, it won't do anything. If you want to change that, change !run to true. (b-t-dubs it isn't really related to DOM, and you described the same action twice (B then A)) https://code.sololearn.com/W6LxO8DJ9QWO/?ref=app
15th Jun 2019, 8:32 PM
Airree
Airree - avatar
+ 1
yup Airree that's what i'm looking for. ThankYou!
16th Jun 2019, 5:40 AM
Ginfio
Ginfio - avatar