tags:

views:

29

answers:

1

I' using:

$(document).ready(function() { 
    $('#pollform').ajaxForm(function() { 
    $('#pollform').reset();
    }); 
}); 

How can I bring in the following to the above function?

$('#myForm2').ajaxForm( { beforeSubmit: validate } ); 
+1  A: 

The function you pass in to $(document).ready() is a normal function, so you can make multiple calls there:

$(document).ready(function() { 

    $('#pollform').ajaxForm(function() { 
        $('#pollform').reset();
      }); 

    $('#myForm2').ajaxForm( { beforeSubmit: validate } ); 
});
Sander Rijken