This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Validation Events for changing response CSS classes */ | |
document.addEventListener( 'wpcf7invalid', contactform7replace ); | |
document.addEventListener( 'wpcf7spam', contactform7replace ); | |
document.addEventListener( 'wpcf7mailfailed', contactform7replace ); | |
document.addEventListener( 'wpcf7mailsent', contactform7replace ); | |
function contactform7replace(){ | |
modal = jQuery('#Modal'); | |
msgcontainer = jQuery(".wpcf7-response-output"); | |
modal.modal('show'); | |
msgcontainer.css('opacity','0'); | |
modal.find('.modal-body').html( 'Please wait...' ); | |
modal.find('.modal-footer, .modal-title').hide(); | |
setTimeout(function(){ | |
msg = msgcontainer.html(); | |
msgcontainer.hide(); | |
modal.find('.modal-body').html( msg ); | |
},750); | |
} |