Jump to content
Search Community

Keep Element Pinned Permanently

emilychews test
Moderator Tag

Recommended Posts

Hi,

 

Is there anyway of pinning an element permanently?  I need some type of infinity value to put in the end property.  The .box-2 element is going to be for an ad that comes in and gets pinned at the side of article and I need it to stay fixed in position permanently once pinned.

 

Many thanks for any assistance.

Em.

See the Pen gOPoWJO by emilychews (@emilychews) on CodePen

Link to comment
Share on other sites

Yep, a large number should work, but just note that the marker will still be at that spot (super far down), thus if you have markers turned on, it'll lengthen your page quite a bit. Just turn them off and it'll go back to normal.

 

Another option: try setting:

end: "max"

The only caveat is that it'll use the "max" when refreshing that particular ScrollTrigger but if you have other ScrollTriggers after that which include pinSpacing, that could alter what the "max" scroll value is. So it may just be safest to use a very large number.

  • Like 3
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...