Update README.md

This commit is contained in:
rajgoel 2013-12-20 16:38:13 +01:00
parent 5a8da0555c
commit 4498e6e609
1 changed files with 10 additions and 4 deletions

View File

@ -266,15 +266,19 @@ Reveal.configure({
autoSlide: 5000 autoSlide: 5000
}); });
``` ```
When this is turned on a control element will appear that enables users to pause and resume auto-sliding. Alternatively, sliding can be paused or resumed by pressing »a« on the keyboard. Sliding is paused automatically as soon as the user starts navigating. You can disable these controls by specifying ```autoSlideStoppable: false``` in your reveal.js config.
When this is turned on a control element will appear that enables users to pause and resume auto-sliding. Sliding is also paused automatically as soon as the user starts navigating. You can disable these controls by specifying ```autoSlideStoppable: false``` in your reveal.js config. You can also override the slide duration for individual slides and fragments by using the ```data-autoslide``` attribute on individual sections or fragments:
You can also override the slide duration for individual slides by using the ```data-autoslide``` attribute on individual sections:
```html ```html
<section data-autoslide="10000">This will remain on screen for 10 seconds</section> <section data-autoslide="2000">
<p>After 2 seconds the first fragment will be shown.</p>
<p class="fragment" data-autoslide="10000">After 10 seconds the next fragment will be shown.</p>
<p class="fragment">Now, the fragment is displayed for 2 seconds before the next slide is shown.</p>
</section>
``` ```
Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired.
### Keyboard Bindings ### Keyboard Bindings
@ -308,6 +312,7 @@ Reveal.prevFragment();
Reveal.nextFragment(); Reveal.nextFragment();
Reveal.toggleOverview(); Reveal.toggleOverview();
Reveal.togglePause(); Reveal.togglePause();
Reveal.toggleAutoSlide();
// Retrieves the previous and current slide elements // Retrieves the previous and current slide elements
Reveal.getPreviousSlide(); Reveal.getPreviousSlide();
@ -320,6 +325,7 @@ Reveal.isFirstSlide();
Reveal.isLastSlide(); Reveal.isLastSlide();
Reveal.isOverview(); Reveal.isOverview();
Reveal.isPaused(); Reveal.isPaused();
Reveal.isSliding(); // auto slide mode
``` ```
### Ready Event ### Ready Event