Solved

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

Posted on 2015-02-15
2
92 Views
Last Modified: 2015-02-20
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.
0
Comment
Question by:Brahmanatha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
Alexandre Simões earned 500 total points
ID: 40611331
This is called "Sticky Header".
Here's a nice Code Pen example: http://codepen.io/senff/pen/ayGvD
0
 

Author Comment

by:Brahmanatha
ID: 40622198
Excellent. I used that code and it worked out of the box!
0

Featured Post

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question