Streaming live at 10am (PST)

Running custom JS code when an element scrolls into view


#1

Hi folks,

The short story is: I would want to run a piece of JS code whenever a section scrolls into view. Is there any way to bind to that event for a group of elements (for example all tags) ?

I looked through the Webflow.js file thats included on published sites, but couldn’t find anything usefull… Maybe theres a site wide event being triggered when an element scrolls into view?

Thanks in advance


#2

I want to do it as well! I use bodymovin/lottie-animations and need to control the animation with scroll interactions by calling a custom JS function.

It would be huuuge if thats possible!


#3

Something like this perhaps? https://stackoverflow.com/q/487073/584192


#4

Kind of, yea, but i was hoping to use the built in functions that Webflow uses. What youre suggesting will have to do the trick for now :slight_smile: Thanks for the assist!


#5

As pgrzyb said; It would be nice to integrate it with the webflow interactions as they did with the Webflow Ecommerce site: https://webflow.com/ecommerce