Check if any checkboxs are checked in jQuery?
<p>I have a form.html:</p>

<pre><code>    &lt;div id="tag_option"&gt;
        &lt;li&gt;&lt;label for="id_customer_type"&gt;Customer type:&lt;/label&gt;
            &lt;select id="id_customer_type" class="required" name="customer_type"&gt;
                &lt;option value="" selected="selected"&gt;All&lt;/option&gt;
                &lt;option value="NGO"&gt;NGO&lt;/option&gt;
                &lt;option value="GOV"&gt;GOV&lt;/option&gt;

            &lt;/select&gt;
        &lt;/li&gt;

        &lt;li&gt;
            &lt;label for="id_tag"&gt;Tag:&lt;/label&gt; &lt;dl&gt;
            &lt;dt&gt;&lt;strong&gt;School&lt;/strong&gt;&lt;/dt&gt;
            &lt;dd&gt;&lt;label for="id_tag_1"&gt;&lt;input
              name="tag"
              value="2"
              id="id_tag_1"
              type="checkbox"&gt; Private&lt;/label&gt;&lt;/dd&gt;
            &lt;dd&gt;&lt;label for="id_tag_2"&gt;&lt;input
                   name="tag" value="3" id="id_tag_2" type="checkbox"
                   &gt; Public&lt;/label&gt;&lt;/dd&gt;
        &lt;/dl&gt;&lt;/li&gt;

        &lt;input id="tag_checked" name="tag_checked" value="" type="hidden"&gt;
        &lt;input id="store_filter_saved" name="store_filter_saved" value="" type="hidden"&gt;
    &lt;/div&gt;
</code></pre>

<p>How to do this?</p>

<p>I have tried..</p>

<pre><code>$(document).ready(function(){
    function updateTagChecked() {
        var list_tag_selected = [];
        //$("input[name^=tag_]")
        $('#tag_option :checked').each(function() {
            list_tag_selected.push($(this).val());
        });
        $('#tag_checked').val(list_tag_selected.join("&amp;"))
    }

    $(function() {
         $('#tag_option input').click(updateTagChecked);
         updateTagChecked();
    });
</code></pre>

<p>My problem in this point I just want to specify for only checkbox.</p>

<pre><code>$('#tag_option :checked').each(function()
</code></pre>

<p>I try to change to:</p>

<pre><code>$("input[name^=tag]")
$('div#tag_option input[name="tag"]').attr('checked')
</code></pre>
