get value of checked[ALL] or unchecked box jquery
<p>I have read this.</p>

<p><a href="http://stackoverflow.com/questions/2048485/jquery-checkbox">http://stackoverflow.com/questions/2048485/jquery-checkbox</a></p>

<pre><code>&lt;input type="checkbox" name="checkGroup" id="all"&gt;
&lt;input type="checkbox" name="checkGroup" id="one" value="1"&gt;
&lt;input type="checkbox" name="checkGroup" id="two" value="2"&gt;
&lt;input type="checkbox" name="checkGroup" id="three" value="3"&gt;
&lt;input type="hidden" name="storeCheck" value=""&gt;


$(function(){
    $("#all").click(function(){
        $("input:checkbox[name='checkGroup']").attr("checked",$(this).attr("checked"));
         //array[1,2,3] will be pass to value of storeCheck
    });

    $("input:checkbox[name='checkGroup']:not('#all')").click ( function(){
        var totalCheckboxes = $("input:checkbox[name='checkGroup']:not('#all')").length;
        var checkedCheckboxes = $("input:checkbox[name='checkGroup']:not('#all'):checked").length;

        if ( totalCheckboxes === checkedCheckboxes )
        {
            $("#all").attr("checked" , true );
        }
        else
        {
            $("#all").attr("checked" , false );
        }
    });
});
</code></pre>

<p><a href="http://jsbin.com/uwoze" rel="nofollow">Demo</a></p>

<p>I am trying to get the value of the checkboxs are checked as an array.</p>

<p>for example </p>

<pre><code>if I checked All 
    Get value  array_check = 1,2,3 and  passed this array to hidden name="storeCheck"
otherwise:
    Get value of array_check( checkboxs checked ).and  passed this array to hidden name="storeCheck"
</code></pre>
