我有:
$(document).ready(function(){
// bind myForm and provide a simple callback function
$( #form ).ajaxForm(function() {
alert("Works!!!");
});
});
The problem is that when I dynamically add the form to the HTML the script is not working. If the form is there from the beginning the form is submitted with Ajax and works as expected. What is the problem here?