diff options
author | Hakim El Hattab | 2012-05-31 21:31:28 -0400 |
---|---|---|
committer | Hakim El Hattab | 2012-05-31 21:31:28 -0400 |
commit | aaf9da450f51ad3196681cd48e7921c73532ea4d (patch) | |
tree | 5730f5d13ad65a6691321316749a599ae8d2c9d8 /README.md | |
parent | 31bbfe939878c8fae215b42153aa1a5339e02af4 (diff) |
dispatch events when visible fragment changes ('fragmentshown', 'fragmenthidden') closes #44
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -88,6 +88,19 @@ Reveal.addEventListener( 'slidechanged', function( event ) { } ); ``` +### Fragment events + +When a slide fragment is either shown or hidden reveal.js will dispatch an event. + +``` +Reveal.addEventListener( 'fragmentshown', function( event ) { + // event.fragment = the fragment DOM element +} ); +Reveal.addEventListener( 'fragmenthidden', function( event ) { + // event.fragment = the fragment DOM element +} ); +``` + ## Examples @@ -126,6 +139,7 @@ Reveal.addEventListener( 'slidechanged', function( event ) { - Added print styles. Thanks [skypanther](https://github.com/skypanther) - The address bar now hides automatically on mobile browsers - Space and return keys can be used to exit the overview mode +- Events for fragment states ('fragmentshown'/'fragmenthidden') #### 1.2 |