Skip to content

Commit

Permalink
fix: js 폴더 정리
Browse files Browse the repository at this point in the history
  • Loading branch information
nayoonju committed Jun 16, 2024
1 parent 7efec97 commit 758c1ad
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 26 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 1 addition & 26 deletions assets/js/signup2.js → assets/js/auth/signup2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const form = document.querySelector("form");
const inputList = form.querySelectorAll("input");
const submitBtn = form.querySelector("#submitBtn");

submitBtn.disabled = true;

inputList.forEach((input) => {
input.addEventListener("keyup", function () {
checkInputs(input);
Expand Down Expand Up @@ -98,31 +96,8 @@ form.addEventListener("submit", (e) => {
}
});



// 패스워드 토글기능
let passwordToggleBtns = document.querySelectorAll('.password-toggle-button');

function passwordToggle(e) {
let button = e.currentTarget;
let passwordInput = button.parentElement.querySelector('input');
let toggleIcon = document.createElement('i');
toggleIcon.classList.add('icon');
if (passwordInput.type == "password") {
passwordInput.type = "text";
toggleIcon.classList.remove('ic_visible_on');
toggleIcon.classList.add('ic_visible_off')
this.setAttribute("aria-label", "비밀번호 숨기기");
} else {
passwordInput.type = "password";
toggleIcon.classList.remove('ic_visible_off');
toggleIcon.classList.add('ic_visible_on');
this.setAttribute("aria-label", "비밀번호 보기");
}
button.innerHTML = '';
button.appendChild(toggleIcon);
}

const passwordToggleBtns = document.querySelectorAll('.password-toggle-button');
passwordToggleBtns.forEach(btn => {
btn.addEventListener('click', passwordToggle);
});
Empty file removed assets/js/password-toggle.js
Empty file.

0 comments on commit 758c1ad

Please sign in to comment.