Skip to content
This repository was archived by the owner on Jan 24, 2018. It is now read-only.
This repository was archived by the owner on Jan 24, 2018. It is now read-only.

data-menu-offset percentage offset #71

@toneffectory

Description

@toneffectory

currently, data-menu-offset can't handle percentage offsets.
I fixed it by changing line 134 to:

                //Is it a percentage offset?
                if(/p$/.test(menuOffset)) {
                    targetTop += (menuOffset.slice(0, -1) / 100) * document.documentElement.clientHeight;
                } else {
                    targetTop += +menuOffset;
                }

Can you add this to the source?

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