+ 5
Again a question about animation.😁
I have made an animation as follows: https://code.sololearn.com/WtGmq63AVGb4/?ref=app First click the purple button, then the blue, and then the cyan button and see the changes. I want that when I click the blue button, the red colour in the signal vanishes, and when I click the cyan button, the yellow colour in the signal vanishes. Can anyone please tell me how do I do it? If possible please do.it for me so that I can understand. Thanks!☺👍
2 odpowiedzi
+ 2
instead of adding an onlick to the HTML elements you should rather add an event listener and conditionals to check the style is already red, yellow or green respectively. then perform actions based in the current fill colour.
I hope this helps you
thanks
+ 2
Dark Ranger event listeners are added in javascript