Using AJAX on Contact-form the WordPress way

EDIT

TL;DR
Your page is refreshing because you tell the form to load a new page (the page specified under action).

Longer answer
The reason the page refreshes is because your form has an action associated with it. When I viewed your page yesterday, I saw the AJAX routine complete, and then the page refreshed. Why? Because after the AJAX finished (or even before it finished), the form was sent to the file specified under action. If you don’t want the page to refresh, don’t use the HTML form. Simply have input fields and tie the button click to the AJAX function. Does that make sense?

END EDIT

First, I would try to understand how WordPress suggests AJAX is done.
https://codex.wordpress.org/AJAX_in_Plugins

Second, I am wondering if you need AJAX. AJAX is used for accessing a database without having to reload the page. For example, in a Google search bar, you get suggestions as you type. This is AJAX.

However, submitting forms that reload a page with a “thanks” message is not what you should use AJAX for. Forms are handled differently with regular CGI (in WordPress, you can do this in straight PHP). There is no need to create additional complexity if you use AJAX in this context.

Does that make sense? Just have the form action be a php file that collects the form data, stores it in the database, and writes a new page with the desired message.