Skip to content
Discussion options

You must be logged in to vote

Here is a JS script that you can add to your presentation which is using Reveal JS event hooks and API

Put this in a file skip-section.html

<script>
  Reveal.on( 'slidechanged', event => {
    if (event.currentSlide.id.includes("section")) {
      var prev_ind = Reveal.getIndices(event.previousSlide)
      var cur_ind = Reveal.getIndices(event.currentSlide)
      if (cur_ind.h <= prev_ind.h) {
        Reveal.prev()
      } else {
        Reveal.next()
      }
    }
} );
</script>

and use include-after-body to insert it at the end of the document.

---
title: test
format:
  revealjs:
    theme: serif
    incremental: true
    toc: true
    toc-depth: 2
    toc-title: Outline
    include-aft…

Replies: 8 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@aborruso
Comment options

@cderv
Comment options

@aborruso
Comment options

Comment options

You must be logged in to vote
2 replies
@cderv
Comment options

@cderv
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by mcanouil
Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

Comment options

You must be logged in to vote
2 replies
@tchevri
Comment options

@cderv
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
revealjs Issues with the revealjs format
4 participants