I'm in the process of creating a simple example for displaying hidden content with a "Read More" button. The setup includes a paragraph and a button, with half of the text inside a span tag that is initially hidden. However, I have been able to implement the code successfully but now I am looking to add a fade-in effect using pure JavaScript instead of jQuery. Can anyone offer assistance with this?
var span = document.getElementsByTagName('span')[0];
var hideshow = document.getElementById('hideshow');
span.style.display = 'none';
hideshow.onclick = function() {
span.style.display = 'block';
};
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa maiores dolore earum ducimus molestiae, aut. <span>Quisquam consequuntur, maiores et, doloremque atque provident similique consequatur totam voluptas vitae veniam, molestiae laborum.</span></p>
<button id="hideshow">Read More</button>