Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed embarassing closure bug

  • Loading branch information...
commit 71804039d8ffbfc36e3676fb9a405ddfc99237c9 1 parent c04dd9f
@davidflanagan authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 examples/13.01.reveal.html
8 examples/13.01.reveal.html
@@ -16,6 +16,10 @@
// Find the "handle" element with the container
var title = elt.getElementsByClassName("handle")[0];
// When that element is clicked, reveal the rest of the content
+ addRevealHandler(title, elt);
+ }
+ function addRevealHandler(title, elt) {
title.onclick = function() {
if (elt.className == "reveal") elt.className = "revealed";
else if (elt.className == "revealed") elt.className = "reveal";
@@ -29,5 +33,9 @@
<h1 class="handle">Click Here to Reveal Hidden Text</h1>
<p>This paragraph is hidden. It appears when you click on the title.</p>
+<div class="reveal">
+<h1 class="handle">Click Here to Reveal More</h1>
+<p>This is another hidden paragraph!</p>
Please sign in to comment.
Something went wrong with that request. Please try again.