let loginBtn = document.getElementById("btn-login");
let loginDiv = document.getElementById("loglog");
let signupBtn = document.getElementById("btn-signup");
let signupDiv = document.getElementById("signMe");
loginBtn.addEventListener("click", () => {
if (loginDiv.style.display === "none") {
signupDiv.style.display = "block";
} else {
loginDiv.style.display = 'none';
}
})
<div id="loglog">
<form id="wrap">
<img class="userImage" src="user.png" alt="user">
<input id="email" type="text" name="email" placeholder="E-mail">
<input id="password" type="password" name="password" placeholder="Password">
<button id="btn-login" type="button" onclick="login()">Login</button>
<div id="warning-msg"></p>
</form>
</div>
<div id="signMe">
<form id="Create">
<h2>Create Account</h2>
<input id="firstName" type="text" placeholder="First Name">
<input id="lastName" type="text" placeholder="Last Name">
<input id="newEmail" type="text" placeholder="E-mail">
<input id="newPassword" type="password" placeholder="Password">
<button id="btn-signup" type="button" onclick="registerUser()">Sign Up</button>
<div id="warning-msg">
</form>
</div>
Hello knowledgeable individuals, I am seeking assistance on displaying the signup button (div2) when clicking the login button (div1). Please note that the initial CSS display property for div2 is set to "none". Thank you for your help.