【发布时间】:2011-08-29 11:51:07
【问题描述】:
好的,
我正在使用 jeditable + jmaskedinput 来操作我的表格。
$(".edit_user").editable("save.php", {
data: '{"84":"Test User","85":"Test User"," ":" "}',
type: "select",
onblur: "submit",
});
在此之后,我想在我的表中添加一个新列。
$('table.schichtplan tr:first').append('<th><div class="add_user" id="xyz">User</div></th>');
我通过一个按钮在上面调用它;)
所以我添加了一个新的 TH 元素,但我无法通过 jeditable 对其进行编辑。
我的代码:
$(".edit_employee").editable("save.php", {
data: some json,
type: "select",
onblur: "submit",
placeholder: "Mitarbeiter"
});
$('#add_employee').click(function(){
var tage = $('table.schichtplan tr').length-4;
var sort_id = $('table.schichtplan').find('tr')[0].cells.length-1;
var new_th = '<th><div id="plan_id:'+plan_id+';sort_id:'+sort_id+'" class="edit_employee">Mitarbeiter</div></th>';
$('table.schichtplan tr:first').append(new_th);
});
这是我使用的顺序。嗯
编辑:
$('th > div').live('mouseenter',function(){
$(this).editable("save.php", {
data: json,
type: "select",
onblur: "submit",
placeholder: "Mitarbeiter"
});
});
即使这样也行不通;(
【问题讨论】:
标签: jquery jeditable html-table