I've got a form that I'm trying to create, and I want it to change based on what radio buttons are selected at the start:
I want it to work as follows:
If nothing is selected, none of the Divs are visible.
If Item 1 is selected, only Div 1 appears.
If Items 2, 3, or 4 are selected, Divs 1, 2, and 3 all appear.
If Item 5 is selected, only Div 3 appears.
If Item 6 is selected, none of the Divs appear.
I've gotten as far as 'if nothing is selected, none of the Divs are visible', but making certain Divs appear when certain radio buttons are selected isn't working for me like I feel that it should. I tried doing something in jQuery (the highest-rated answer to this question, since it does work in the sample), but it didn't work for some reason. Any idea why it wouldn't work, and what I can do to make it work?
I want it to work as follows:
If nothing is selected, none of the Divs are visible.
If Item 1 is selected, only Div 1 appears.
If Items 2, 3, or 4 are selected, Divs 1, 2, and 3 all appear.
If Item 5 is selected, only Div 3 appears.
If Item 6 is selected, none of the Divs appear.
I've gotten as far as 'if nothing is selected, none of the Divs are visible', but making certain Divs appear when certain radio buttons are selected isn't working for me like I feel that it should. I tried doing something in jQuery (the highest-rated answer to this question, since it does work in the sample), but it didn't work for some reason. Any idea why it wouldn't work, and what I can do to make it work?