From: andy matthews Date: Mon, 30 Apr 2012 14:07:23 +0000 (-0500) Subject: Adding example for custom event binding. X-Git-Tag: 1.3.0~19^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2caac75c62861ce2c68d2c0f2341836b2ff1aef9;p=reveal.js.git Adding example for custom event binding. --- diff --git a/index.html b/index.html index 5346e34..0e30911 100644 --- a/index.html +++ b/index.html @@ -143,6 +143,18 @@ +
+

Custom Events

+

+ Additionally custom events can be triggered on a per slide basis by binding to the data-state name. +

+

+ document.addEventListener('customevent', function(){
+ alert('event has fired');
+ }); +

+
+

Clever Quotes

@@ -250,6 +262,10 @@ 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,