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.

Interesting. Thanks.

I know this topic is pretty old but probably it still could be useful for someone as this is a comment task I always meet working with Bubble.

I created a plugin that could help you to solve this kind of tasks!

It detects which elements are currently visible on the screen, triggers an event when an item becomes visible and provides you an Element ID or a Repeating Group item index.

It can be particularly useful to highlight menu items, Table of Content items (Scrollspy feature), animate items on scroll, show / hide items etc.

Some demos:
Demo 1: Element ID
Demo 2: Vertical RG
Demo 3: Horizontal RG

Plugin Page;

1 Like

This is awesome! Thanks for coming up with this solution!