Forum Academy Marketplace Showcase Pricing Features

Detect when an element moves out of viewport

Hi Everyone,

I’m using a plugin to detect when an element moves into the viewport. Is there a way to detect the opposite case, eg when an element moves out of the viewport?

My current workflow is: When Element Is Detected —> Show Plugin.
Now I’d like to hide the plugin when the element is not detected.

Many thanks for your time!