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)