How just to see the content from one of the buttons

Hello i would like to only see the content from one of the buttons so lets say that i click the ‘show me cars’ and after that i click the ‘show me animals’ or ‘show me fruits’ i only see the content of that determinated button without see the content of buttons previously clicked, right now i see the content of buttons previously clicked and not only the content of the button that i’m clicking
This is my code in CODEPEN
https://codepen.io/christian-amador/pen/EBPwwK

1 Like

You will also have to remove the ‘hid’ css class from every div when you click the button everytime.

You can also create this feature by using jQuery Tabs which looks quite good.

hey men thanks alot for your help, yea i was trying all the possible ways to do it just by using css but didnt work, but thats alright cause im trying to learn javascript even when i find your last js hard to understand to my current level by thanks

1 Like

How? Can you share with us the codes for it.

Good concept. You are using radio buttons for doing this work.