How to show div of the active radio?

0 like 0 dislike
6 views
Here is an example:
5aeb51c1c01a0187564761.png
When you have an active radio show a hidden div in it, and when changing to clean.
by | 6 views

2 Answers

0 like 0 dislike
If div is in the radio, then you can implement like this:

$(".radio").click(function(){ // Hide other open div blocks $(".hidden-content").removeClass("active"); // Add div'y that is a descendant down the input, the class active $(this).children(div).addClass("active"); })
by
0 like 0 dislike
It seems it should work
[type="radio"]:checked + .hidden-content{ disply: block; }
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,651 users