gfranko / jquery.tocify.js

A jQuery Table of Contents plugin that can be themed with Twitter Bootstrap or jQueryUI.
http://gregfranko.com/jquery.tocify.js/
MIT License
928 stars 216 forks source link

Disabling overscroll with tocify #93

Open SamuelRazzell opened 8 years ago

SamuelRazzell commented 8 years ago

First of all, tocify is really gorgeous and simple. Thank you for making it, it's really helpful.

I've been trying to add tocify to my site for the past week, and I could never get the highlighting as you scroll functionality to work. I finally found that the root cause was that I disabled overscrolling on my site, and tocify seems to scroll on the html or body elements, and this was incompatible with the way I disabled overscroll. Here's the css I used:

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: auto;
}

Is there a way to change the element that tocify scrolls, or another workaround so that I can have tocify working without overscroll? Thanks!