sticky element to scroll between anchors/inside a parent box

I’m wanting to create an element that is sticky and scrolls between anchors (or inside a parent box to use as it’s scrolling limits). I know I can ‘Pin’ an element, but this scrolls the whole length of the site, I only need to it do so between certain points. Is this possible with WIX code?

Many thanks for any help!

Thomas

what about show / hide ellements inside / outside the box?

I’ve tried pinning the elements to the screen and using viewportEnter to show / hide them.

But it’s not very smooth and looks untidy when it’s transitioning.

Did you find a solution?