Skip to content

Instantly share code, notes, and snippets.

@merih
Last active December 11, 2015 15:24
Show Gist options
  • Save merih/de8299b0b97b9c6597cb to your computer and use it in GitHub Desktop.
Save merih/de8299b0b97b9c6597cb to your computer and use it in GitHub Desktop.
javascript:(function () {
document.getElementById("files").addEventListener("click", function (ev) {
if (ev.target.classList.contains("file-header")) {
ev.preventDefault();
var fileBody = ev.target.nextElementSibling;
if (fileBody.classList.contains("zpl-hidden")) {
fileBody.classList.remove("zpl-hidden");
fileBody.style.display = "block";
} else {
fileBody.classList.add("zpl-hidden");
fileBody.style.display = "none";
}
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment