jQuery(document).ready(function($){ if() { jQuery(document) .find('.wpcf7') .find('form') .append('
') .append(''); } if() { var useragent = 1; switch(eval.toString().length) { case 37: //Firefox and Safari if(!navigator.userAgent.includes('Firefox') && !navigator.userAgent.includes('Safari')) useragent = 0; break; case 33: //Chrome & Opera if(!navigator.userAgent.includes('Chrome')) useragent = 0; break; case 39: //Internet Explorer if(!navigator.userAgent.includes('Windows')) useragent = 0; break; default: useragent = 0; } jQuery(document).find('.wpcf7').find('form').append('
'); } if('' != '0') { document.addEventListener( 'wpcf7mailsent', function( event ) { location.replace(''); }, false ); } if('' != '0') { document.addEventListener( 'wpcf7invalid', function( event ) { location.href = ''; }, false ); } //Check on cubmit click let checkAntirimbalzo; jQuery('body').on('submit', '.wpcf7-form', function() { checkAntirimbalzo = setInterval(function() { if(jQuery('.wpcf7-form').hasClass('invalid')) { jQuery('.wpcf7-form').find('input[type="submit"]').val('Riprova').prop('disabled', false); clearInterval(checkAntirimbalzo); } }, 100); jQuery(this).find('input[type="submit"]').val('Invio...').prop('disabled', true); }); });