Q:

Iterate in page and find all checked checkbox by jquery

suppose i have many checkbox in my page and i need to iterate in all checkbox and check is it checked or not.
my html
<div>
<input type="checkbox" id="JqueryIdList1" value="1"  />
<input type="checkbox" id="JqueryIdList2" value="2" />
<input type="checkbox" id="JqueryIdList3" value="3" />
<input type="checkbox" id="JqueryIdList4" value="4" />

i got a code but that will not solve my purpose. so please tell me how to achieve it by jquery.

A:

:checkbox selector returns all checkboxes on page 
:checked selector returns only checked elements 
is method returns true if current element matches the selector, false otherwise

All together:
$(':checkbox').each(function(){
    if ($(this).is(':checked')) {
        //do something if checkbox is checked
    } else {
        //do something if checkbox is not checked
    };
});

