I have this function:
var ButtonChoice = function(key, type, img, label){
this.key = key;
this.type = type;
this.img = img;
this.label = label;
this.getButton = function(){
return "<img src='img/" + this.img + "' type='" + this.type + "' id='" +
this.key + "' class='ButtonsChoice' description='" + this.label +
"' />"
};
};
And I need to add click function to this images. My question is how to do that?