The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Total Page Scroll Control Reply To: Total Page Scroll Control


It’s all in this line:

if (apex < gate && nadir > range)

Currently it will make an item active when its top (apex) is at the bottom of the screen or above. Change to 0.5*gate if you want it when entering the middle. The other condition is set to make it active after the item’s bottom is going beyond the height of the top menu which was stored in the range variable near the end of the script. Can also be changed to any other value you like.