Forum Academy Marketplace Showcase Pricing Features

How to detect scrolling position with respect to an element

Hi,

I have a floating button at the bottom of my screen clicking on which scrolls user to the enquiry form in the page.

I want this button to disappear when user scrolls down to a place where the enquiry form becomes visible by itself.

I know that I can do it by checking scroll position. However, in my case I have a repeating group which can have different number of elements, and hence scroll position of the enquiry form is not fixed.

How do I achieve this? Is it possible to get scrolling position relative to another element? Something like if I say, “Make this element invisible, when user has scrolled to this element”

Thanks
Mukesh

Dis you get a solution?

Nope. Just gave a fixed scrolling position check instead of with respect to an element I think.

OK, thank you.

Probably it could be solved by Scrollspy plugin.
It can tell you which item in the repeating group is currently on the screen (and its index and even the item itself).

Plugin page: https://bubble.io/plugin/scrollspy-1610326820506x757120895346278400
Demo: https://scrollspy.bubbleapps.io/

Interesting. Thanks.