I have a project I'm doing for a friend. I want to display some text and when a "learn more" button is clicked, the remainder of the text will appear. I've split the visible and non-visible text into separate
tags and given them a class name - there are 3 of them.
<div class="column">
<h2> BCI </h2>
<p class="visible_text">
The Better Cotton
Initiative (BCI) is a global
non-profit organisation
cemented around being
the largest cotton sustainability
programme in the
world.
</p>
<p class="non_visible_text">
The Better Cotton Initiative (BCI) is a global non-profit organisation
cemented around being the largest cotton sustainability
programme in the world. Striving towards better global cotton
production, in terms of bettering the lives of those who produce
it, better for the environment it grows in and better for the
sector’s future.
Thanks to the help of several partners, the BCI provides training
on more sustainable farming practices to more than two million
cotton farmers in 21 countries. In the 2017-18 cotton season,
licensed BCI Farmers produced more than five million metric
tonnes of ‘Better Cotton’ – that accounts for around 19% of
global cotton production!
</p>
<button class="learnBtn">
<img src="images/LearnMore.png" alt="Learn More Button">
</button>
</div>
So when the button is clicked I want the text in the class "non_visible_text" to display below the "visible_text".
Any ideas?