how can i deselect the select all checkbox if a checkbox have been uncheck / deselected ?
Updated my pen to do this. Basically on click of any checkbox, if the "checked" prop is false, uncheck the Select All Checkbox.
$("input[type=checkbox]").click(function() { if (!$(this).prop("checked")) { $("#selectAll").prop("checked", false); } });
Now if you were looking to also check the Select All box when everything gets checked, you'd have to on click, find all the other check boxes, see if they're all checked and set the Select All box accordingly.
Thanks
I've been trying but I couldn't implement it can you please provide me the source code or explain it with an example.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
how can i deselect the select all checkbox if a checkbox have been uncheck / deselected ?
Updated my pen to do this. Basically on click of any checkbox, if the "checked" prop is false, uncheck the Select All Checkbox.
Now if you were looking to also check the Select All box when everything gets checked, you'd have to on click, find all the other check boxes, see if they're all checked and set the Select All box accordingly.
Thanks
I've been trying but I couldn't implement it can you please provide me the source code or explain it with an example.