diff --git a/assets/js/script.js b/assets/js/script.js index b6e279d..4ea6b96 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -23,4 +23,19 @@ const goTopBtn = document.querySelector("[data-go-top]"); window.addEventListener("scroll", function () { window.scrollY >= 500 ? goTopBtn.classList.add("active") : goTopBtn.classList.remove("active"); -}); \ No newline at end of file +}); + +function handleFormSubmit(event) { + event.preventDefault(); // Prevents the form from reloading the page + + // Display the success message + document.getElementById('successMessage').style.display = 'block'; + + // Clear the input field after submission + document.getElementById('emailInput').value = ''; + + // Clear the success message after 4 seconds + setTimeout(function() { + document.getElementById('successMessage').style.display = 'none'; + }, 4000); // 4000 milliseconds = 4 seconds +} \ No newline at end of file diff --git a/index.html b/index.html index 7e496ae..1c27f2f 100644 --- a/index.html +++ b/index.html @@ -761,7 +761,7 @@

-