aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorHakim El Hattab2012-05-31 21:31:28 -0400
committerHakim El Hattab2012-05-31 21:31:28 -0400
commitaaf9da450f51ad3196681cd48e7921c73532ea4d (patch)
tree5730f5d13ad65a6691321316749a599ae8d2c9d8 /README.md
parent31bbfe939878c8fae215b42153aa1a5339e02af4 (diff)
dispatch events when visible fragment changes ('fragmentshown', 'fragmenthidden') closes #44
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index ac57153..2c629b1 100644
--- a/README.md
+++ b/README.md
@@ -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