use .prop instead of .is(':checked')