ScrollMagic
ScrollMagic copied to clipboard
unpin after reach other div
Hi,
How to unset pinned div when reaching other defined div? Pleaselook at my codepen here: http://codepen.io/caturprayogo/pen/VLRvMO
I'm confuse when I add "duration: 500" it only give blank space. Thank you for help.
Here you go: http://scrollmagic.io/examples/expert/cascading_pins.html it is in the examples :)
@Master244 that link doesn't actually show/solve the problem of the title (updated title), it shows how to pin -> unpin -> re-pin the same div and so on.
@caturprayogo another poster asked a similar question here however @janpaepke responded that it was not possible to use a separate div as the trigger to unPin another (previous) pin.
@caturprayogo to answer your question and hopefully clear your confusion though, in the documentation (and primarily seen in the examples) it says:
Note that the first pin pushes down the following elements. A gap with the size of the scene's duration appears.
Then it says you can stop it from doing that by passing the setting pushFollowers
to false
. Example line of code:
.setPin("#pinned", { pushFollowers: false })
You can read more about pinning here in the basic example or here in the documentation.