Sometimes I create long HTML reports and it's difficult to tell other people where to look at during a conference call as there's no page reference. I would like to add a "go to top" button that will hold its place when scrolling the page. This way, after discussing one section of results, I can instruct other team members to click on that button, and go back to the top of the document where the table of contents is and we go from there.
Even better, is it possible to add field with a drop-down list of links to section and subsection titles?
It's actually really easy. Simply insert this line of code at the end of your document (or wherever you want to put it):
<a href="#top">Back to top</a>
This should do the trick. Atleast it works with html markdown documents made with knitR
.
If you want to create a drop down element, you have to look into html forms
and select option
.
This is a bit dated but I was looking for this today.
I ended up adding this at the end of my mark down pages.
[Back to top](#) // any text here would work unless you want to point to a particular id in the html
And it seems to work fine too. I mean it will be converted to the same html as the above but at least you can use the md syntax
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With