mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2025-06-28 12:55:36 -04:00
more code
This commit is contained in:
parent
17d664eaeb
commit
6fb88b315a
10 changed files with 130 additions and 14 deletions
14
inventory/public/js/components/addForm.js
Normal file
14
inventory/public/js/components/addForm.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
function addForm() {
|
||||
let buttonClicked = true;
|
||||
const addForm = document.querySelector(".add-form");
|
||||
const button = document.querySelector(".add-btn");
|
||||
|
||||
button.addEventListener("click", () => {
|
||||
buttonClicked
|
||||
? (addForm.style.display = " block")
|
||||
: (addForm.style.display = "none");
|
||||
buttonClicked = !buttonClicked;
|
||||
});
|
||||
}
|
||||
|
||||
export { addForm };
|
Loading…
Add table
Add a link
Reference in a new issue