how to know if ajax is complete in jquery?


Staff member
There is a generated form from contact form 7 in wordpress.
I would like to know if this is the right way of coding in getting the output messages from contact form after it submit and return the messages (either success or not). This code work but it double send the ajax form.

ajaxArgs = {
   url: '',
        success: function () {
            var a= $(".wpcf7-response-output").html();
$(".wpcf7-form").bind('submit', function() {

if you submit the form from contact form 7. it works in ajax way and I want to get the error or success message after it complete the ajax. I need your advice guys if this is good enough or please if you have a code that makes it better to use.