diff --git a/index.html b/index.html
index 63df650..9e6756d 100644
--- a/index.html
+++ b/index.html
@@ -13,24 +13,24 @@
diff --git a/src/main.js b/src/main.js
index 04a56b5..fe74a09 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,9 +1,9 @@
import { ShoppingListItem } from "./ShoppingListItem";
import { ShoppingCategory } from "./ShoppingCategory";
-const addItemForm = document.querySelector(".list__form__addItem");
-const addCategoryForm = document.querySelector(".list__form__addCategory")
-const itemListElement = document.querySelector(".list__displayedList");
+const addItemForm = document.querySelector(".addItemForm");
+const addCategoryForm = document.querySelector(".addCategoryForm")
+const itemListElement = document.querySelector(".displayedList");
let listElements = []; // Liste der erstellten Items und Kategorien
@@ -36,7 +36,7 @@ function renderItemList() {
}
function renderAddItemPrompt() {
- const selectMenu = document.querySelector(".list__inputForm__selectCategory");
+ const selectMenu = document.querySelector(".addItemForm__categorySelect");
let categories = listElements.filter(element => element instanceof ShoppingCategory);
const emptySelection = document.createElement("option");
@@ -61,7 +61,7 @@ function init() {
renderAddItemPrompt();
- document.querySelector(".list__form__addItem").addEventListener("submit", (event) => {
+ document.querySelector(".addItemForm").addEventListener("submit", (event) => {
if (!addItemForm.checkValidity()) return;
event.preventDefault();
const addItemFormData = Object.fromEntries(new FormData(addItemForm));
@@ -69,7 +69,7 @@ function init() {
});
- document.querySelector(".list__form__addCategory").addEventListener("submit", (event) => {
+ document.querySelector(".addCategoryForm").addEventListener("submit", (event) => {
if (!addCategoryForm.checkValidity()) return;
event.preventDefault();
const addCategoryFormData = Object.fromEntries(new FormData(addCategoryForm));