I’m trying to create a todolist app.
And I added an input field to my todo, but can’t insert any text.
I have tried different ide including Codepen and JsFiddle.
Can you help me?
This is my code in Codepen:
One of the
divs is infront of your text input.
id="line" is in the way of your
input. Delete it, or change the CSS to move it out of the way.
Hope this helps.
As said, the
linediv is covering up the input element.
You have two event listeners on the same button, one inline and one using
button.onclick. You can remove the inline and call addTask() at the bottom of the
button.onclickcallback function. Edit: You should probably just move the task counter code into the addTask function instead. Also, remember to decrement the task counter in removeItem.
Looks like you didn’t save the new div you are creating in addTask, I’m guessing you wanted to save it as
You do not have an element with a