Hi everyone!

I'm trying to create a text edit in place myself just by manipulating
jQuery selectors. But, after the first ajax callback, the others
callback for the same input text doesn't work anymore...

I've tried to use livequery plugin but it didn't work...

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());
                }
            });
        });
    }

My question is: how can i rebind this??? Rebind the blur event... When
I blur the input text, nothing happens on the second ajax callback.
Thanks!!
Andre Miranda

Reply via email to