Tags

, , , , , ,

Add your popup code between if and else if condition

$(“.wpcf7-submit).click(function(event) {
$( document ).ajaxComplete(function() {
var result =$(“.wpcf7-response-output”).hasClass(“wpcf7-validation-errors”) ? “fail” : “success”;
if(result==’fail’){ // error popup code }else if(result==’success’){ // success popup code }
});
});

Advertisements