stack icon indicating copy to clipboard operation
stack copied to clipboard

jump to slide with anchor link

Open d-nnis opened this issue 10 years ago • 1 comments

Hey there thank you for this quite easy-to-use library!

I was wondering though how I could implement navigation with links to a slide. The intuitive approach of jumping to an anchor with both html an JS failed:

<a href="#one">Jump to one</a>

or:

  <a href="#" onclick="document.getElementById('one').scrollIntoView()">Jump to one</a>

jumping to:

  <p id="one">Slide one<p>

d-nnis avatar Apr 15 '15 14:04 d-nnis

I have solved it with a workaround for now:

<a onClick="window.scrollBy(0, (window.innerHeight)*2)">Jump to slide three!</a>

d-nnis avatar Apr 16 '15 12:04 d-nnis