little jQuery to loop through checkboxes
by z3n on Aug.18, 2009, under Coding
This is a little function to loop throught a specific form or id with checkboxes, it will check if the checkbox is checked and then you can `do something`.
-
function (what)
-
{
-
jQuery.each(jQuery("#"+what+" :checkbox"),function(){
-
if (jQuery(this).is(':checked')) {
-
// do something
-
}
-
});
-
}
1 comment for this entry:
December 6th, 2010 on 16:14
Thank you. This was exactly what I was looking for.