Add class when user scrolls below the sticky container#16
Add class when user scrolls below the sticky container#16SaFrMo wants to merge 2 commits intorgalus:masterfrom
Conversation
|
Hi there, when would this be useful? Thanks @SaFrMo !! |
|
@patrickbolle Hey! I had some elements I wanted to fade out when the sticky element reached the bottom of its container. This pull request makes that easy with just CSS: .sticky-element .to-fade-out {
opacity: 1;
}
.sticky-element.stuck-bottom .to-fade-out {
opacity: 0;
}I don't think this is going to help in your case - it'd be best, if possible, to size the sticky-container so that it doesn't run over the lower section, or to use |
…ping sticky element)
|
Added additional ability to create a sibling placeholder instead of wrapping the sticky element: Wrapping sticky elements with iframes as children forces the iframes to be re-rendered, but doing so broke the iframe's content with Google DFP ads. I copied the functionality of the wrapping function and made it work the same way on a sibling |
|
@SaFrMo Just want to throw some thanks your way. Your fork with these features makes this library 😍 👌 |
|
Thanks @jamsinclair ! 😄 |
Adds a class when the user scrolls past the container, leaving the sticky element at the bottom of the sticky-container.