【发布时间】:2009-02-26 05:36:41
【问题描述】:
我正在尝试通过操作 jQuery 选择器自己创建一个文本编辑。但是,在第一个 ajax 回调之后,针对相同输入文本的其他回调不再起作用...
function editaVal(celDiv, id)
{
var novoConteudo = $("<input type='text' id='novoCont" + id + "' value='" + $(celDiv).html() + "' />");
$(celDiv).dblclick(function()
{
$(this).html(novoConteudo);
});
$(novoConteudo).blur(function()
{
$(novoConteudo).parents("tr").removeClass('trSelected');
$.ajax({
type: 'POST',
url: '/SuperAdmin/SalvaValor/?busca=' + $(novoConteudo).val() + '&codValor=' + id,
beforeSend: function()
{
$(celDiv).html($("#loading").show());
},
success: function()
{
$(celDiv).html($("#loading").hide());
$(celDiv).html(novoConteudo.val());
}
});
});
}
我的问题是:我怎样才能重新绑定这个???重新绑定模糊事件...当我模糊输入文本时,第二个 ajax 回调没有任何反应。
谢谢!!
【问题讨论】:
标签: jquery