echo 'Message Succesfully Sent!<script>$(\'response-message\').text(\'Message Succesfully Sent!\');var form = document.getElementById("contact-form");form.reset();</script>';
The error is in this part.
$(\'response-message\')
should be $(\'.response-message\')
.
Notice the .
you’re missing? You’re trying to target the ELEMENT called response-message, not the div with the class of it.
3
solved PHP Message success function [HELP]