I would like to change a HTML class with JavaScript!
<div class="not-submitted-check" data-submit-check>
<i class="fas fa-check-circle"></i> Thank you for contacting us,
<button type="button" class="close"><i class="fas fa-times"></i></button>
</div>
I want the div class to change when i press the submit button
<button type="submit" class="submit" data-submit-button>submit</button>
const submitButton = document.querySelector("[data-submit-button]");
submitButton.addEventListener("submit", handleSubmit);
I want to create a function where the moment i press the button the classes change one with another