PSD to HTML conversion PSD to HTML conversion PSD2HTML.com with over 300 professionals takes the designs to HTML and beyond

Code Snippet

Home » Code Snippets » jQuery » Check if Checkbox is Checked

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');

Reference URL

Subscribe to The Thread

  1. LuK says:

    $(“input[type='checkbox']:checked”).each(function(){

    // your code

    });

  2. gabBerg says:

    What if a radio button is selected?

  3. Rupam says:

    The website is horrible in IE6. At least the design for the page should be made differently to work in IE6

  4. Bit late reaction, but hey maybe someone will find it usefull. You can also use


    $('#checkBox').is(':checked')

Speak, my friend

At this moment, you have an awesome opportunity* to be the person your mother always wanted you to be: kind, helpful, and smart. Do that, and we'll give you a big ol' gold star for the day (literally).

Posting tips:
  • You can use basic HTML
  • When posting code, please turn all
    < characters into &lt;
  • If the code is multi-line, use
    <pre><code></code></pre>
Thank you,
~ The Management ~