Last active
August 27, 2023 05:05
-
-
Save jalotra/68b08ccee539dca8926a58d062a8e6f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var form = document.querySelector("form"); | |
var nextBtn = form.querySelector(".nextBtn"); | |
var backBtn = form.querySelector(".backBtn"); | |
var allInput = form.querySelectorAll(".input-field"); | |
nextBtn.addEventListener("click", () => { | |
allInput.forEach(input => { | |
if(input.value !== ""){ | |
form.classList.add('secActive'); | |
}else{ | |
form.classList.remove('secActive'); | |
} | |
}) | |
}) | |
backBtn.addEventListener("click", () => form.classList.remove('secActive')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment