You need a closure new scope :
for (key in this.mybutton)
(function(button) {
$(button).click(function() {
console.log("click:" + button)
});
})(this.mybutton[key]);
}
or just use this
:
$(button).click(function() {
console.log("click:" + this)
});
Concatenating a DOM element and a string in the console log doesn't seem like a very good idea ?