Show chapters selection when article marker is in view
- Source:
Properties:
Name | Type | Description |
---|---|---|
selectors |
object | Chapters CSS selectors |
states |
object | css and animation states for chapters module |
$elem |
NodeList | chapters element |
currentScrolPos |
number | store current scroll position to determine scroll direction |
currentScrollDirection |
string | 'up' or 'down' |
scrollListener |
function | event handler for handling scroll event |
Methods
(inner) hideChatpers(evt)
- Source:
Hide chapters widget when hero area is in view
Parameters:
Name | Type | Description |
---|---|---|
evt |
object | in view event |
(inner) init()
- Source:
Set up inview listener to handle show / hide of chapters
(inner) monitorScroll()
- Source:
Monitor scroll position to determine if the chapters widget should be anchored to the top of stacked below sticky header
(inner) showChatpers(evt, forcedShow)
- Source:
Show chapters widget when marker element is in view or when forced via forcedShow flag (triggered on page load)
Parameters:
Name | Type | Description |
---|---|---|
evt |
object | in view event |
forcedShow |
boolean |
(inner) updateState()
- Source:
Update next / previous item states when panel is opened / closed