I am trying to clone a row in a table and want to set default values for some td elements for editing. If I don't set default value, I am able to edit that td div element but if I set default value I am unable to edit.
Here is the code:(if I remove html("") I am able to edit td div elements)
$("#create_blank_scenario").click(function(){
var row = $('#sortable_offer_table tbody tr:first').clone(true);
row.find("td div").editable( { onEdit:selectText}).addClass("editable").html("");
row.insertBefore('#sortable_offer_table tbody tr:first');
});
Code for selectText:
function selectText(content){
this.children("input").select();
}
editable css:
.editable input{
font-size:10px;
width:40px;
border:0;
}