forked from jimmynotjim/scrollnav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subsections: adds 'active' and 'in-view' classes
This commit adds the 'in-view' class to a subsection if it is in the viewport, and adds the 'active' class to the first sub-section that is in the viewport. This is done by re-factoring the code that adds the offset data for sections and the code that checks if a section is in the viewport to a separate function and invoking these functions on subsections as well as sections.
- Loading branch information
Masud Rahman
committed
Feb 1, 2015
1 parent
0c48ae0
commit 5055f5d
Showing
1 changed file
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters