Displaying a hidden flex item

I have been doing some investigating as to how to display a hidden (display none) flex item. Is the best approach to use toggle() instead of changing display?
I have three hidden DIV’s, and only one will be displayed based on user input

flex items
A
B
C
D or E or F
G
H
I
J
etc.

Seeing your actual HTML and CSS rather
than text would be much more beneficial
for members, as it would then allow them
to see the problem and possibly resolve it. :wink:

1 Like

Use JS to toggle the class on the element concerned.

Then use CSS to show it.

e.g.

.invisible{display:none;}
.visible{display:flex;}
1 Like