0
How to show or hide divs based on radio button list selection?
5 Réponses
+ 1
Prof Freelancer
You can do like this:
https://code.sololearn.com/WGDFjI6889fy/?ref=app
+ 1
Can it be used to show and hide multiple divs?
+ 1
Prof Freelancer
Yes it can be but all divs should have same class.
I have used id because of single div but you can use class for multiple divs
0
I want more than two radio buttons with multiple divs and when I click a radio button it shows one of the divs then when I click another radio button it shows a different div and so on
0
Prof Freelancer
Then you have to create buttons and divs using JavaScript and give dynamic classes on button and div and using click event you can hide and show div based on button.