functions – Add OnClick event with CSS or Javascript


I have a small challenge in WordPress.

I want to have two separate Column Blocks(Block A and Block B).

Then I want Block B to always stay hidden(as if it’s not there). But there will be a button under Block A with the text “Show More”.

And when this button is clicked, Block B shows up under it, while the Text in the Button changes to “Show Less”.

If the Button with “Show Less” Text is clicked again, Block B should disappear again. It should return to being hidden.

You can see what I’m looking for here —

Which Code can help me achieve this in CSS or JavaScript?

Gamicord 3 weeks 2021-11-07T23:22:55-05:00 0 Answers 0 views 0

Leave an answer