Below is a snippet of some of my code. Think a todo list on steriods. I am trying to create multiple Div elements that save to a page that contain a different list every time my "Save button is pressed. whats actually happening is that multiple divs are showing but the original div saved is the only one that gets updated with the list information(so like in a todo list when you click submit a new list item appears ive added a save button and an input field that the user can use to name their list and saves that list to a container but only one div gets updated). I know i’m almost there but ive been looking at this for a couple of hours now and cant quite figure it out. https://github.com/W33K5Y/TODO-PIRPLE
const saveButton = document.getElementById("submit-save");
const myLists = document.getElementById("my-lists");
const startNote = document.getElementById("start-note");
const listName = document.getElementById("new-list-name");
const myUl = document.getElementById("my-ul-lists");
// ! savebutton listener
saveButton.addEventListener("click", addNewTodo);
// ! make new html elements
const newTodoOl = document.createElement("ol");
const newTodoLi = document.createElement("li");
const listH1 = document.createElement("h4");
// ! =============== function for creating new todo ================================
function addNewTodo() {
const todoDiv = document.querySelector(".todo-container");
const todos = document.querySelectorAll(".todo-item");
todos.forEach(function(todo) {
createLi(todo);
});
listName.value ? listH1.innerText = listName.value : listH1.innerText = "My List";
newTodoDivWrap.classList.add("new-todo-div");
newTodoDivWrap.appendChild(listH1);
newTodoDivWrap.appendChild(newTodoOl);
myLists.appendChild(newTodoDivWrap);
todoReset(todoDiv, startNote);
startLoginSignUpNoneLobbyFlex();
}
// todo function to go in above that removes all of whats in the tido-container
function todoReset(div, lobbyDiv) {
lobbyDiv.remove();
div.firstElementChild.innerHTML = "";
}
function createLi(todo) {
// ! Create LI
const newTodo = document.createElement('li');
newTodo.innerText = todo.innerText;
newTodo.classList.add("todo-saved-item");
newTodoOl.appendChild(newTodo);
}
over the counter amoxicillin kroger – buy amoxicillin noscript generic amoxil
vardenafil online us – discount vardenafil online vardenafil hcl 20mg tab
tadalafil for sale – canadian cialis pharmacy can i buy tadalafil in mexico
stromectol order online – ivermectin 0.08 oral solution
generic lyrica for sale – lyrica 75 mg pill best ed pills
buy amoxicillin 500 mg from canada – amoxicillin without prescription bulk order amoxicillin in usa
tadalafil best price 20mg uk – pharmacy mall order cialis online fast shipping
covid ivermectin – where to buy stromectol buy ivermectin 3mg
prednisone tablets cost – prednisone 20 mg prednisone drugs
buying zithromax online – zithromax online buy zithromax
buy lasix – lasix online no prescription lasix medication
rx cialis canada – tadalafil 40 mg tadalafil 5mg tablets india
ivermectin 6 – generic stromectol for humans stromectol ivermectin 3 mg
casino slots gambling – casino slot casino moons online casino
erectile dysfunction meds – new ed drugs erectile dysfunction medication
prednisone for cheap – deltasone without script online in mexico prednisone 10 mg price
viagra medicine price – sildenafil generic over the counter viagra canada
cialis daily use generic – Cialis for order tadalafil 100mg tablets
stromectol tab – ivermectin purchase ivermectin buy australia
what is the best ed pill – best canadian pharmacy online impotence definition
lasix 40 mg price lasix generic nek nox
furosemide tablet price lasix prescription nek nox
frusemide tablets 40mg furosemide price walgreens nek nox
cost of cytotec in south africa – buy cytotec australia cytotec 200g
ivermectin lotion for lice ivermectin 400 mg brands
clomid generic nek nox
stromectol without prescription buy ivermectin pills
ivermectin for humans ivermectin 3 mg tablet dosage
cost of 2.5mg prednisone – 40mg prednisone mail order prednisone
ivermectin where to buy for humans – ivermectin uk ivermectin 3 mg for sale
plaquenil 400 mg plaquenil generic drug 400 mg plaquenil at once when to take plaquenil
synthroid canada – levothyroxine medication generic gabapentin 800mg
acheter 50mg viagra en ligne – tadalafil 40mg comprimГ© acheter tadalafil en ligne
prednisone online buy – new canadian pharmacy express prednisone over the counter
order isotretinoin 40mg pill – amoxil 500mg drug cheap amoxicillin pill
order tizanidine 2mg online – prozac order online colchicine 0.5mg tablet
order inderal 10mg online cheap – inderal 10mg generic plaquenil 200mg generic