Need to make "sticky link" to Table of Contents in a book page

We are developing a new view for outputting pages from inside inflated epubs to static html pages

please see:

http://dev.himalayanacademy.com/html/manager/templates/tmpl-single-book-page.html

One requirement I've been tasked with is to try to make the "Table of Contents" link at the top, stick to the window. i.e. as the user scrolls up the div that contains the link (which open a  light view) will stick to the top of the screen.

I searched for a solution and plugged in a small JS (jquery) and wrapped the link in div to target. but it does not work.

I am out of my depth here... probably very, but I don't know what do.  Hope you can help.
BrahmanathaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Alexandre SimõesConnect With a Mentor Manager / Technology SpecialistCommented:
This is called "Sticky Header".
Here's a nice Code Pen example: http://codepen.io/senff/pen/ayGvD
0
 
BrahmanathaAuthor Commented:
Excellent. I used that code and it worked out of the box!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.