jQuery set checkbox checked

you have to use the ‘prop’ function :

.prop('checked', true);

Before jQuery 1.6 (see user2063626’s answer):

.attr('checked','checked')

Leave a Comment