Script:
//Previne múltiplos cliques no Contato
jQuery(document).on('click', '.wpcf7-submit', function(e){
if( jQuery('.ajax-loader').hasClass('is-active') ) {
e.preventDefault();
return false;
}
});
OU
//Previne múltiplos cliques no Contato
jQuery(document).on('click', '.wpcf7-submit', function(e){
if( jQuery('.ajax-loader').css('visibility') == 'visible' ) {
e.preventDefault();
return false;
}
});
SCSS:
.ajax-loader {
width: 100% !important;
height: 100% !important;
position: fixed;
left: 0;
top: 0;
background-repeat: no-repeat;
background-color: rgba(255,255,255,0.8);
z-index: 999;
background-position: center center;
background-size: 10%;
background-image: none !important;
&:before {
content: "\f110";
font: normal normal normal 50px/1 FontAwesome;
background-position: center center;
position: fixed;
text-align: center;
display: block;
top: 40%;
left: 50%;
animation: fa-spin 1s infinite steps(8);
}
}
.wpcf7-form .wpcf7-response-output {
font-size: 13px;
}
.wpcf7-form .wpcf7-response-output.wpcf7-validation-errors {
color: #D8000C;
background-color: #FFBABA;
border: 0;
padding: 10px;
}
.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
color: #4F8A10;
background-color: #DFF2BF;
border: 0;
padding: 10px;
}
div.wpcf7-mail-sent-ok:before,div.wpcf7-validation-errors:before {
font: 26px/30px FontAwesome;
margin-right: 16px;
vertical-align: middle;
}
div.wpcf7-mail-sent-ok:before {
content:'\f00c';
}
div.wpcf7-validation-errors:before {
content:'\f057';
}