A little dab'll do ya
Code Snippets
Check if Checkbox is Checked
Say that 10 times fast =).
Find out if a single checkbox is checked or not, returns true or false:
$('#checkBox').attr('checked');Find all checked checkboxes:
$('input[type=checkbox]:checked');
$(“input[type='checkbox']:checked”).each(function(){
// your code
});
What if a radio button is selected?
@gabBerg: $(“input:radio:checked”)
@Voigtan Thx!
The website is horrible in IE6. At least the design for the page should be made differently to work in IE6
Why are you still using IE6?
Agree with mahen23.
Also, I think css-tricks’ viewers are mostly web developers – In this case, (I hope) they don’t use IE6 as their default browser..
Bit late reaction, but hey maybe someone will find it usefull. You can also use
$('#checkBox').is(':checked')