mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-04-05 11:20:57 -04:00
17 lines
433 B
JavaScript
17 lines
433 B
JavaScript
function addForm() {
|
|
let buttonClicked = true;
|
|
const addFormClass = document.querySelector(".add-form");
|
|
|
|
if (addFormClass != null) {
|
|
const button = document.querySelector(".add-btn");
|
|
|
|
button.addEventListener("click", () => {
|
|
buttonClicked
|
|
? (addFormClass.style.display = " block")
|
|
: (addFormClass.style.display = "none");
|
|
buttonClicked = !buttonClicked;
|
|
});
|
|
}
|
|
}
|
|
|
|
export { addForm };
|