I'm trying to achieve a fixed element when the scroll scrub enters the start position however the element jumps to a fixed position and on scrollEnd it jumps to its end position.
What I am looking for it that box element is fixed in its original place whilst the rest of the page scrolls until the end of its container.
Here is a video demoing what is happening: https://vimeo.com/717982427
And here is the code Im using:
ScrollTrigger.create({
trigger: '.fix-me',
start: 'top 300px',
end: '=+300px',
markers: true,
pin: true,
pinSpacing: false,
scrub: true
})
It's pretty standard this code as i've used this video as a reference: