mercredi 23 mars 2016

How to limit the number of checked checkbox in jQuery?

I know there're many answers to this, but none of them works for me. My program is like:

 <cml:checkboxes label="Categories" name="categories">
  <cml:checkbox label="a" value="a" />
  <cml:checkbox label="b" value="b" />
  <cml:checkbox label="c" value="c" />
</cml:checkboxes>

Actually it's from CrowdFlower. Now what I want to do is to limit the maximal checked number to 2. I notice that many answers use input labels but that really doesn't work this way. So anyone can help me with that? Thank you so much!




Aucun commentaire:

Enregistrer un commentaire