Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding example for custom event binding.

  • Loading branch information...
commit 2caac75c62861ce2c68d2c0f2341836b2ff1aef9 1 parent 0acae19
@commadelimited commadelimited authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 index.html
View
16 index.html
@@ -143,6 +143,18 @@ <h3 class="inverted">A CSS 3D Slideshow</h3>
</section>
</section>
+ <section data-state="customevent">
+ <h2>Custom Events</h2>
+ <p>
+ Additionally custom events can be triggered on a per slide basis by binding to the <code>data-state</code> name.
+ </p>
+ <p><code style="font-size: 27px;">
+ document.addEventListener('customevent', function(){<br />
+ alert('event has fired');<br />
+ });
+ </code></p>
+ </section>
+
<section>
<h2>Clever Quotes</h2>
<p>
@@ -250,6 +262,10 @@ <h3 class="inverted">BY Hakim El Hattab / hakim.se</h3>
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
} );
+ document.addEventListener('customevent', function(){
+ alert('event has fired');
+ });
+
Reveal.initialize({
// Display controls in the bottom right corner
controls: true,
Please sign in to comment.
Something went wrong with that request. Please try again.