mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-28 12:55:36 -04:00
feat: basic crud complete
This commit is contained in:
parent
6fb88b315a
commit
77a93ae9b1
10 changed files with 105 additions and 27 deletions
|
@ -1,14 +1,17 @@
|
|||
function addForm() {
|
||||
let buttonClicked = true;
|
||||
const addForm = document.querySelector(".add-form");
|
||||
const button = document.querySelector(".add-btn");
|
||||
const addFormClass = document.querySelector(".add-form");
|
||||
|
||||
button.addEventListener("click", () => {
|
||||
buttonClicked
|
||||
? (addForm.style.display = " block")
|
||||
: (addForm.style.display = "none");
|
||||
buttonClicked = !buttonClicked;
|
||||
});
|
||||
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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue