Check all checkbox not working
-
Hi
I use following js code to check or uncheck checkbox inputs when users click on CheckAll checkbox in my new plugin, but it doesn’t work:jQuery(document).ready( function() { jQuery('#element_check_all').on("click",function(e) { jQuery('.element_check').prop('checked', this.checked); }); jQuery('.element_check:not(:first)').on("click",function(e) { jQuery('#element_check_all').prop('checked', false); }); });
The ID of the CheckAll checkbox is #element_check_all and all checkboxes have .element_check class. It is a simple code but I don’t know what is the problem.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Check all checkbox not working’ is closed to new replies.