From ce84054a7a8da72fda6d55a1aad947a8c59aecef Mon Sep 17 00:00:00 2001 From: kyle Date: Sat, 4 Jan 2025 09:08:58 -0500 Subject: [PATCH] add form and buttons for form --- library-app/index.html | 17 +++++++++++++++++ library-app/js/javascript.js | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/library-app/index.html b/library-app/index.html index 12477f5..c468273 100644 --- a/library-app/index.html +++ b/library-app/index.html @@ -9,6 +9,10 @@ +
+ +
+

Book Title

@@ -24,6 +28,19 @@
+ + +
+ + + + + + + + +
+
\ No newline at end of file diff --git a/library-app/js/javascript.js b/library-app/js/javascript.js index bb3f8ce..6091d62 100644 --- a/library-app/js/javascript.js +++ b/library-app/js/javascript.js @@ -1,5 +1,7 @@ const myLibrary = []; const container = document.getElementById("main"); +const addBookBtn = document.getElementById("addBook"); +const dialog = document.querySelector("dialog"); function Book(title, author, pages, read) { this.title = title; @@ -41,6 +43,9 @@ function createCard (book){ } +addBookBtn.addEventListener("click", () => { + dialog.showModal() +}) console.log(myLibrary) addBookToLibrary("Test Book", "Kyle", "300", true)