In line 34, even if there are no done tasks, the button Cleanup is enabled. How to make it work such that it is enabled only if there are elements with done attribute are present.
How to find the number of elements in the list with custom class
You can do it by using length function.
// Gets the number of elements with class yourClass
var numItems = $('.yourclass').length
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
