Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll selected container instead of the document.body #154

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

mikocot
Copy link

@mikocot mikocot commented Jan 11, 2021

In web applications with fixed layout, e.g. fixed side panels, footer, often the body itself does not scroll and all the content is located within one of the containers.

With this change one can specify the container to be scrolled when initializing the 'tour'.
If nothing specified, the default setting (document.body) is used.

new EnjoyHint({
    elementToScroll: '#main-content'        //scroll main content instead of document body
});

Both scrolling to element and scrolling on page resize is supported.

mikolaj.kocot and others added 27 commits January 11, 2021 13:28
fork improvements listed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant