This code of mine is not working.
document.getElementById("information-read-more").addEventListener("click", function(){
document.getElementsByClassName("read-more-less-inner").style.display= "block";
});
Trying to build a read more section of my HTML that hides on mobile and reappears when the user clicks a button.
The style sheet has a media query that sets the display to none on a div with the read-more-less-inner class when the window gets small enough. Im wanting this read more button to override the style I made and show it.
The event listener fires when I click it, just the style doesnt change.
I dont think it makes a difference but im doing the project in a wordpress page.