[jQuery] Combining ajaxForm and livequery

[jQuery] Combining ajaxForm and livequery


Can I use livequery on ajaxForm?
or is there another way to add event listeners to ajax produced form?
This page redirects to the example
http://reenie.org/test/hffc.php
If you click "Login" and add any name, the form submits and shows you
logged in.
If you don't add a name the form submits and mimics the situation
where the user is not found. It displays an error message and displays
the login form again
The "close" button works before and after the form is rewritten
because it uses livequery to bind it to the click function.
$("#loginclose") .livequery('click', function(event) {
//closes login box
}
However, after the form is submitted, the form's event listeners are
missing.and the form is will not be submitted via ajax again.
I'm using this code to bind the form to the options function.
$('#loginform').ajaxForm(options);
How do I bind the form again without reloading the page?



















    • Topic Participants

    • info1