Using checkboxes to control other elements
I want to use two checkboxes to control the appearance of two blocks. The click method doesn't work well for this situation. I have tried to use the change method, but don't know how to detect which checkboxes are checked. Can someone give a hand please?
- $(':checkbox').change(function(){
- // ....
- $(':checkbox:checked').each(function(){
- // ????
- });
- });