Skip to content

Instantly share code, notes, and snippets.

@jerry42
Created February 8, 2020 16:13
Show Gist options
  • Save jerry42/b639773c86e5c3fd867a71c3cd5943c5 to your computer and use it in GitHub Desktop.
Save jerry42/b639773c86e5c3fd867a71c3cd5943c5 to your computer and use it in GitHub Desktop.
Check/Uncheck list checkbox
$('.classCheckbox').each(function() {
if ($(this).is(':checked') && $('#master_checkbox').is(':checked') == false)
$(this).trigger('click');
else if (!$(this).is(':checked') && $('#master_checkbox').is(':checked') == true)
$(this).trigger('click');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment