This is my code:
When you change the attribute also use the following:
$('.chk').trigger('change');
Or in your code like other people have suggested:
$('.chk').attr('checked', true).trigger('change');