/ Published in: jQuery

source: http://www.electrictoolbox.com/check-uncheck-checkbox-jquery/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if($('#chkId:checked').val() != null) { // checked } //or if($('#chkId:checked').length != 0) { // checked } //or $('input[name=foo]').is(':checked') $('input[name=foo]').attr('checked') // check uncheck $('input[name=foo]').attr('checked', true);
URL: http://drupal.org/node/116548
Comments
