vendredi 18 mars 2016

Handling checked checkboxes jquery

I have a scenario of 3 checkboxes and table with few rows.

Let's say checkboxes chk_1, chk_2 and chk_3. P.S: chk_1 is checked by default.

The condition that I require is:

  1. If chk_1 checked -> display table row A only
  2. If chk_2 checked -> display table row A only
  3. If chk_3 checked -> display table row B only
  4. If chk_1 and chk_2 checked -> display table row A only
  5. If chk_1 and chk_3 checked -> display table row A and B both
  6. If chk_2 and chk_3 checked -> display table row A and B both
  7. If chk_1, chk_2 and chk_3 checked -> display table row A and B both

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire