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

Add option scrollContainer for scrollable parent #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Your website's html structure has to be similar to this in order to work:
</div>
````

Note that inner sidebar wrapper ``.sidebar__innner`` is optional but highly recommended, if you don't write it yourself, the script will create one for you under class name ``inner-wrapper-sticky``. but this may cause many problems.
Note that inner sidebar wrapper ``.sidebar__inner`` is optional but highly recommended, if you don't write it yourself, the script will create one for you under class name ``inner-wrapper-sticky``. but this may cause many problems.

If your content is inside a fixed-height div with a scrollbar, this must be specified with the ``scrollContainer`` option.

For the above example, you can use the following JavaScript:

Expand All @@ -66,7 +68,8 @@ For the above example, you can use the following JavaScript:
topSpacing: 20,
bottomSpacing: 20,
containerSelector: '.main-content',
innerWrapperSelector: '.sidebar__inner'
innerWrapperSelector: '.sidebar__inner',
scrollContainer: '#main-viewport'
});
</script>
````
Expand Down
23 changes: 19 additions & 4 deletions dist/jquery.sticky-sidebar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jquery.sticky-sidebar.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jquery.sticky-sidebar.min.js

Large diffs are not rendered by default.

23 changes: 19 additions & 4 deletions dist/sticky-sidebar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sticky-sidebar.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading