+ 3

how can i add event in a canvas shap

i want make a game and use of cansvas tag how i can write a event when i click on shaps this event run if you have better way please say me🤕🤕🙏🙏🙏

18th Aug 2017, 8:38 AM
amirhosein bidar
amirhosein bidar - avatar
1 Odpowiedź
+ 2
give it a class or id and select it using js after that but it in a call back function like this canvas. click (fuction(event) { });
5th Sep 2017, 8:47 PM
mhadi ahmed
mhadi ahmed - avatar