I\'ve draw an image inside a canvas tag. How could I add events to it? I want to do something when user clicks in that image.
character.addEventListener(\'cl
There's no way to add event handlers to actual drawings on the canvas. You can handle events for the entire canvas - that's it.
Your options at this point is to either add an abstraction over the canvas, and lookup drawings you have there based on coordinates from canvas click events - or to drop canvas altogether and go for e.g. svg. The Raphaël library (http://raphaeljs.com/) can help you with the latter.