how to loop throw all the Fileds in the view to check wheather checkbox is checked or not using jque
- by kumar
Hello friends.
I have this code I am checking wheather checkbox i checked or not..
$('#btnsubmit').click(function() {
$('#Details input[type=checkbox]').each(function() {
if ($(this).attr('checked')) {
alert("selected");
return false;
} else {
alert("please select atleast one user");
return false;
}
});
});
here var checked showing true or false..
I have deatils Fieldset in the view.. like that each field set having one check box.. like that there are three fieldsets with one check box..I need to know how many details checkbox is checked?
can I loop each Details Fieldset to know how many details checkboxes are cheked?
thanks