Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. 1. Mark the section you are working with by `id` of `current`
  2.  
  3. ```
  4. <section id="current">
  5. </section>
  6. ```
  7.  
  8. 2. Add the following snippet below `Reveal.initialize()`
  9.  
  10. ```
  11. var indices = Reveal.getIndices(document.getElementById('current'));
  12. if (indices.h && indices.v) {
  13. setTimeout(() => Reveal.slide(indices.h, indices.v), 100);
  14. }
  15. if (indices.h && !indices.v) {
  16. setTimeout(() => Reveal.slide(indices.h), 100);
  17. }
  18. ```
  19.  
  20. Example result:
  21. ```
  22. Reveal.initialize({
  23. dependencies: [
  24. { src: 'plugin/markdown/marked.js' },
  25. { src: 'plugin/markdown/markdown.js' },
  26. { src: 'plugin/notes/notes.js', async: true },
  27. { src: 'plugin/highlight/highlight.js', async: true }
  28. ]
  29. });
  30.  
  31. var indices = Reveal.getIndices(document.getElementById('current'));
  32. if (indices.h && indices.v) {
  33. setTimeout(() => Reveal.slide(indices.h, indices.v), 100);
  34. }
  35. if (indices.h && !indices.v) {
  36. setTimeout(() => Reveal.slide(indices.h), 100);
  37. }
  38. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement