Skip to content

Instantly share code, notes, and snippets.

@kmancher
Created March 17, 2019 05:38
Show Gist options
  • Select an option

  • Save kmancher/3cba555cc157241f43ad4d74d4fbdd06 to your computer and use it in GitHub Desktop.

Select an option

Save kmancher/3cba555cc157241f43ad4d74d4fbdd06 to your computer and use it in GitHub Desktop.
minimize description
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