js question

i am making to do app, and i cant figure out how to check if "goal" is confirmed. https://codepen.io/etrbbr/pen/LEPoMQZ i have one idea but i am not sure that is correct. check with foreach listContainer and if it has "confirmed" class in LI i just add+1 every time to my counter.
df
CodePen
Untitled
...
5 Replies
Jochem
Jochemā€¢3w ago
document.querySelectorAll('#list-container .checked').length should do the trick
Helgi
HelgiOPā€¢3w ago
oh fuck bro no way that was so easy šŸ˜­
i_lost_to_loba_kreygasm
why doesnt the add button work ?
Jochem
Jochemā€¢3w ago
it did last night when I looked at it, so I think he's changed something. If you look in the console, you should see why it doesn't work
Helgi
HelgiOPā€¢3w ago
yeah i was playing with some values and i didnt save file

Did you find this page helpful?