~ overflow ~

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`.

  1. function (what)
  2. {
  3. jQuery.each(jQuery("#"+what+" :checkbox"),function(){    
  4.  if (jQuery(this).is(':checked')) {
  5.                         // do something
  6.  }
  7. });
  8. }
:, , ,


1 comment for this entry:
  1. Prad

    Thank you. This was exactly what I was looking for.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!