Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function toggle() {
- let button = document.querySelector(".button");
- let textDIV = document.getElementById("extra");
- button.textContent = button.textContent == "More" ? "Less" : "More";
- textDIV.style.display = textDIV.style.display == "none" ?
- textDIV.style.display == "block" :
- textDIV.style.display == "none";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement