var tmp = $("<input>", {css: {height: '100%', width: "100%" },type: 'button', value: 'Button', click : function() { $(this).css('background-color', 'red'); }});