aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2012-05-04 00:01:20 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2012-05-04 00:01:20 -0400
commit19b67aab1314818b71ea39323c74308c6073f52d (patch)
tree9f9df74ccf375cae78278d9b3b54f6fac8487f50 /index.html
parentebb834f4b0b42363e3a59836fc1f2aa15a691c77 (diff)
downloadperl-software-in-gnu-guix-19b67aab1314818b71ea39323c74308c6073f52d.tar
perl-software-in-gnu-guix-19b67aab1314818b71ea39323c74308c6073f52d.tar.gz
'slidechanged' event, added Reveal.addEventListener/Reveal.removeEventListener api methods
Diffstat (limited to 'index.html')
-rw-r--r--index.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/index.html b/index.html
index 7f291cf..f314cdb 100644
--- a/index.html
+++ b/index.html
@@ -148,7 +148,7 @@
<p>
Additionally custom events can be triggered on a per slide basis by binding to the <code>data-state</code> name.
</p>
- <pre><code contenteditable style="font-size: 18px; margin-top: 20px;">document.addEventListener( 'customevent', function() {
+ <pre><code contenteditable style="font-size: 18px; margin-top: 20px;">Reveal.addEventListener( 'customevent', function() {
alert( '"customevent" has fired' );
} );
</code></pre>
@@ -261,10 +261,16 @@ linkify( 'a' );
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
} );
- document.addEventListener( 'customevent', function() {
+ // Fires when a slide with data-state=customevent is activated
+ Reveal.addEventListener( 'customevent', function() {
alert( '"customevent" has fired' );
} );
+ // Fires each time a new slide is activated
+ Reveal.addEventListener( 'slidechanged', function( event ) {
+ // event.indexh & event.indexv
+ } );
+
Reveal.initialize({
// Display controls in the bottom right corner
controls: true,