I made a script in order to control master & slave checkboxes (automatic checking and unchecking).
Here is my JS :
$(document).ready(function() {
You could try this.
$('#myCheck').click(function() { var checkBoxes = $(this).siblings('input[type=checkbox]'); checkBoxes.prop('checked', $(this).is(':checked') ? true : false); });