Re-binding an ajaxForm after content re-loads with ajax (jQuery 1.4.2)

Posted by Cristian on Stack Overflow See other posts from Stack Overflow or by Cristian
Published on 2010-05-11T22:07:05Z Indexed on 2010/05/11 22:14 UTC
Read the original article Hit count: 290

Filed under:
|
|
|

I'm trying to figure out why this is a problem when using jQuery 1.4.2 and not 1.3.2.

This is my function:

function prepare_logo_upload() {
    $("#logo-upload-form").ajaxForm({
        //alert(responseText);                                       
        success: function(responseText) {
            //alert(responseText);                                          
            $('#profile .wrapper').html(responseText);
            prepare_logo_upload();
        }
    });
}

Every other live event works but can't use the .live() method because ajaxForm is a plugin. I have noticed this also for other types of binding (clicks) using the old form (re-binding after callback)

Can you tell me if it is a way of solving this?

This is a similar question, but due to my newbie reputation here, can't comment or ask a question there, so I'll ask a new one here. -> http://stackoverflow.com/questions/2208880/jquery-bind-ajaxform-to-a-form-on-a-page-loaded-via-load

Thank you!

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about jQuery