Forum Academy Marketplace Showcase Pricing Features

How to detect when an element is on screen?

Hi :slight_smile: I’m building a landing page and would like to show/hide elements as they become visible on screen (you know, like the fancy websites do.)

I know you can do this using “current page scroll detection” but that involves guessing pixel heights and isn’t good for responsiveness (things will be different heights on mobile.)

I tried testing the “is visible” and “not visible” element states but that doesn’t check if elements are within the viewport.

I just downloaded the “On Screen Detector” plugin so I’ll try that, but are there any other ways to detect if elements on screen / within viewport?


This topic was automatically closed after 70 days. New replies are no longer allowed.