Skip to main content
All Posts By

osheaplanthire

document.addEventListener('wpcf7mailsent', function(event) { const response = event.target.querySelector('.wpcf7-response-output'); if (response) { // Make the message visible and fade in response.style.visibility = 'visible'; response.style.opacity = 1; // Fade it out after 5 seconds setTimeout(function() { response.style.opacity = 0; // Fade out setTimeout(function() { response.style.visibility = 'hidden'; // Hide after fade-out }, 500); // Delay hiding to allow the fade-out effect }, 5000); // Keep the message visible for 5 seconds } });