I made a script in order to control master & slave checkboxes (automatic checking and unchecking).
Here is my JS :
$(document).ready(function() {
Use prop method for new versions of jQuery:
$('#myCheck').prop('checked', true); $('#myCheck').prop('checked', false);
http://jsfiddle.net/uQfMs/37/