js buttonをコンストラクタで生成

$(function(){
  var b = new Button("yohei",clickFunc)
  b.append()
});

function clickFunc(event){alert(event.data.name)}

function Button(name, clickFunc){
  this.name = name
  this.object = $('<button>').text("button").bind("click",{name:this.name},clickFunc);
  this.append = function(){$('div').append(this.object)}
}