In my case, I just add the following code in the header.php file within the head tag and [response] tag in contact-form and it is resolved for me.
<script>
jQuery(function($) {
wpcf7Elm.addEventListener( ‘wpcf7mailsent’, function( event ) {
$(‘.submit-success’).fadeIn();
setTimeout( function() {
$(‘.submit-success’).fadeOut();
},5000);
}, false );
})
</script>
Thanks all of you!