Adding methods to freeze / unfreeze the current headroom's state.#309
Merged
WickyNilliams merged 2 commits intoWickyNilliams:masterfrom Mar 2, 2019
andreivictor:master
Merged
Adding methods to freeze / unfreeze the current headroom's state.#309WickyNilliams merged 2 commits intoWickyNilliams:masterfrom andreivictor:master
WickyNilliams merged 2 commits intoWickyNilliams:masterfrom
andreivictor:master
Conversation
AlexFrazer
reviewed
Feb 28, 2019
Contributor
Author
|
Why closing it? |
Owner
|
Must have done it on accident, sorry! |
Contributor
Author
|
No prob, thanks for your answer. |
Owner
|
This looks good to me, thanks @andreivictor. I'll get this merged now and try and work out a plan for release. I'll also need to update the docs. Unless you have a desire to do that also? |
Contributor
Author
|
I will try to update the |
Owner
|
Don't do it on the weekend if you don't want to, enjoy yourself instead! There's also a website on the gh-pages branch, but it's been so long since I've had to update that, I'm not sure what state it is in. |
Owner
|
Just updating the readme would be more than enough. |
Contributor
Author
|
Updated in #316. Thanks! |
Owner
|
Published to npm as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspired from another PR (#253), I've added methods to freeze and unfreeze the current headroom's state.
freezemethod: When called, this method will freeze the current headroom's state (pinned or unpinned). Headroom will not react to the user's scroll. If you wish to re-enable the headroom's default behaviour, you can call unfreeze method.unfreezemethod: When called, this method will resume headroom's default behaviour. Headroom will pin or unpin when the user scrolls the page. By default, Headroom is not freezed and calling this method before freeze will do nothing.There is also a new property -
frozen- for the classes option:Usage:
Example:
https://codepen.io/andreivictor/pen/oymbLO