stack
stack copied to clipboard
jump to slide with anchor link
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>
I have solved it with a workaround for now:
<a onClick="window.scrollBy(0, (window.innerHeight)*2)">Jump to slide three!</a>