checked's tag archives

jQuery checkbox – how to check if checkbox is checked using jQuery

There are three ways using jquery to check if checkbox is checked. Here they are: [code] // First way $('#checkBox').attr('checked'); // Second way $('#edit-checkbox-id').is(':checked'); // Third way for jQuery 1.2 $("input[@type=checkbox][@checked]").each( function() { // Insert code here } ); // Third way == UPDATE jQuery 1.3 $("input[type=checkbox][checked]").each( function() { // Insert code here } ); [/co...