This reply has been reported for inappropriate content.
Weirdest thing! Seems to me like a bug with setting checkboxes with attr('checked', ...);, you code should definitely be working. I found a workaround though, by simulating a click (also changed your code a bit so you can remove the onclick handler from your html)
var checkBoxes = $(‘.activity’);
var checked = $(this).prop(‘checked’);
var $this = $(this);
if ($this.prop(‘checked’) != checked)
Edit: Ugh, I should refresh before submitting comments… xD Your solution is better.