diff --git a/assets/js/script.js b/assets/js/script.js index 3aba540..7ad74c8 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -74,4 +74,26 @@ const navigateTab = function () { lastTabCard = this; } -addEventOnelem(tabCard, "click", navigateTab); \ No newline at end of file +addEventOnelem(tabCard, "click", navigateTab); + + +document.getElementById('contactForm').addEventListener('submit', function (event) { + event.preventDefault(); + + + setTimeout(function () { + + document.querySelector('input[name="name"]').value = ''; + document.querySelector('input[name="email_address"]').value = ''; + document.querySelector('input[name="subject"]').value = ''; + document.querySelector('textarea[name="message"]').value = ''; + + + document.getElementById('successMessage').style.display = 'block'; + + + setTimeout(function () { + document.getElementById('successMessage').style.display = 'none'; + }, 5000); + }, 500); +}); \ No newline at end of file diff --git a/index.html b/index.html index 1ca90f0..f99f72a 100644 --- a/index.html +++ b/index.html @@ -873,18 +873,16 @@

-
- + - - - - - + +