Skip to content
This repository was archived by the owner on Jul 25, 2022. It is now read-only.
This repository was archived by the owner on Jul 25, 2022. It is now read-only.

Cannot modify Offset #111

@ekntrtmz

Description

@ekntrtmz

Using the newest version of Scrollnav.js:

const content = document.querySelector('.main-content');
const nodeTarget = document.querySelector('.main-navigation');

scrollnav.init(content, {
   sections: 'h1',
   subSections: 'h2',
   insertTarget: nodeTarget,
   scrollOffset: 400 // not working
 });

Unfortunately, after successfully initializing the plugin, there is an offset when triggering the scroll event. I am using a sticky sidebar which may cause the offset.

How can I add scroll offset?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions