Hi coders,
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:
https://codepen.io/camilco/pen/OJPLywM
Hello camcode.
One of the div
s is infront of your text input.
The div
with 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
line
div 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 thebutton.onclick
callback 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
newItem
. -
You do not have an element with a
box-tasks
id, justbox
.