Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Mark the section you are working with by `id` of `current`
- ```
- <section id="current">
- </section>
- ```
- 2. Add the following snippet below `Reveal.initialize()`
- ```
- var indices = Reveal.getIndices(document.getElementById('current'));
- if (indices.h && indices.v) {
- setTimeout(() => Reveal.slide(indices.h, indices.v), 100);
- }
- if (indices.h && !indices.v) {
- setTimeout(() => Reveal.slide(indices.h), 100);
- }
- ```
- Example result:
- ```
- Reveal.initialize({
- dependencies: [
- { src: 'plugin/markdown/marked.js' },
- { src: 'plugin/markdown/markdown.js' },
- { src: 'plugin/notes/notes.js', async: true },
- { src: 'plugin/highlight/highlight.js', async: true }
- ]
- });
- var indices = Reveal.getIndices(document.getElementById('current'));
- if (indices.h && indices.v) {
- setTimeout(() => Reveal.slide(indices.h, indices.v), 100);
- }
- if (indices.h && !indices.v) {
- setTimeout(() => Reveal.slide(indices.h), 100);
- }
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement