If you're creating a mockup:
$("#submitButton").on("click", function( e ) {
e.preventDefault();
$("#thanks").fadeIn( 800 ); // Display Thank You Message
});
#thanks{ display:none; } /* Hide Thank You Message */
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js></script>
Your message:<br>
<textarea></textarea><br>
<a href="javascript:;" id="submitButton"><b>Get in touch</b></a>
<div id="thanks">Thanks for your inquiry!</div>
In most cases, it's recommended to use a success
AJAX event before showing the thank you message (especially when submitting a form)
CSS (Hide Thank You Message):
#thanks{ display:none; }
jQuery (Show Thank You on Success):
$("#submitButton").on("click", function() {
$.ajax({
url: '/mail.php', // or any applicable endpoint
type: "POST",
data: $form.serialize(),
success: function( response ) {
console.log( response ); // Retrieve server response on success
$("#thanks").show(); // Show Thank You Message
},
error: function (a, b, c) {
console.log(a, b, c);
}
});
});