Currently I have a function which loops to create multiple HTML objects. Each time an object is created, I want to add an onClick
function listener to that object so that I can trigger a function when each one is clicked.
What's the best way to do this?
Here's the code which creates my objects:
RenderMultipleChoice:function()
{
this.c = paper.rect(this.x, this.y, this.shapeWidth, this.shapeHeight);
}