Created
March 14, 2022 15:59
-
-
Save Ranjanivraman/da25a343b0d40514433b61c85369f812 to your computer and use it in GitHub Desktop.
Show more javascript and css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function read_more_less() { | |
| var dots = document.getElementById('dots'); | |
| var moretext = document.getElementById('more'); | |
| var mybtn = document.getElementById('myBtn'); | |
| if (moretext.style.display === 'none') { | |
| moretext.style.display = 'inline'; | |
| mybtn.innerHTML = "Show Less"; | |
| } else { | |
| moretext.style.display = 'none'; | |
| mybtn.innerHTML = "Show More"; | |
| } | |
| } | |
| #more{ | |
| display: none; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment