Solved

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

Posted on 2015-02-15
2
80 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
2 Comments
 
LVL 30

Accepted Solution

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

Author Comment

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

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to picture file 3 38
CSS Divs in Safari 3 18
CSS Columns on Slider Mobile 4 22
SVG Star 4 16
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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 customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

744 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now