Question : If check box is checked

Hello,

<input name="cbox" type="cbox" id="cbox" value="1" checked>

So what I want to do something if the above check bock is checked using jquery

Answer : If check box is checked

use : :checked selector

check example here : http://api.jquery.com/checked-selector/
1:
2:
3:
4:
5:
$(document).ready(function() {
    $("input:checked").each(function() {
        alert("I do something!");
    });
});
Random Solutions  
 
programming4us programming4us