How abt restructuring ur code to something like this:
function do_blur_binding() {
// ...
$(novoConteudo).blur(function() {
// ...
$.ajax({
// ...
success: function() {
// ...
do_blur_binding();
}
});
}
function editaVal(celDiv, id) {
// ...
do_blur_binding();
}
:] TY
==
On Thu, Feb 26, 2009 at 1:40 PM, AndreMiranda <[email protected]> wrote:
>
> 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
>
>
--
http://ngty77.blogspot.com