Jump to content
Search Community

Fixed Positioning inside a Draggable instance

CollectedMind test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hey Guys,

 

As always this library is awesomazing.

 

I am working with a draggable instance and I want to set an element inside to fixed. I have no problem adding a class to the container on the appropriate position. The problem is, that fixed element still sits inside the draggable instance due to the relative positioning of it. Any way around this?

 

Thanks!

 

 

Link to comment
Share on other sites

Hey Jack,

 

The main issue with pulling the content out and re-nesting is one of formatting. While that certainly would be a solution, the fixed elements are part of a larger format that does not lend itself well to simply popping it out of the draggable instance.  When I lose the draggable instance and go with a native scroll it is just a matter of adding the correct class at the correct scroll position.  I will post up a draggable solution if I work one out.

 

Awesome utility though and I still use it in several locations.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...