Created
March 17, 2019 05:38
-
-
Save kmancher/3cba555cc157241f43ad4d74d4fbdd06 to your computer and use it in GitHub Desktop.
minimize description
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
| let description, closeButton; | |
| let open = true; | |
| function setup() { | |
| description = select('.content-description'); | |
| closeButton = select('.min'); | |
| closeButton.mousePressed(closeWindow); | |
| } | |
| function closeWindow() { | |
| if (open === true){ | |
| description.hide(); | |
| closeButton.html('+'); | |
| open = !open; | |
| } else { | |
| description.show(); | |
| closeButton.html('-'); | |
| open = !open; | |
| } | |
| } | |
| function draw() { | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment