Top "Intersection-observer" questions

Javascript IntersectionObserver is an API for finding intersections of DOM elements.

How do I know the IntersectionObserver scroll direction?

So, how do I know the scroll direction when the event it's triggered? In the returned object the closest possibility …

javascript html css intersection-observer
IntersectionObserver method not working - Javascript

I have a div that I want to change color when it scrolls into the viewport, and I'm trying to …

javascript html scroll dom-events intersection-observer
JS - Testing code that uses an IntersectionObserver

I have a (rather poorly written) javascript component in my application that handles infinite scroll pagination, and i'm trying to …

javascript unit-testing qunit intersection-observer
IntersectionObserver iOS & Safari

My goal is to change position to a video element if the user scrolls further to the video element. I'm …

javascript html scroll banner intersection-observer
Intersection Observer when element leaves the viewport

Is there a way to detect if an element leaves the viewport using Intersection Observers? For example, I have an …

javascript intersection-observer
IntersectionObserver on IE, Edge

IntersectionObserver is fairly new, experimental API, and at this moment is not fully supported by all browsers. It will have …

javascript internet-explorer foreach microsoft-edge intersection-observer
Same intersection observer for multiple HTML elements

I am trying to make it so that as some text items stop overlapping a dark background, they will individually …

javascript intersection-observer
Uncaught TypeError: Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'Element'

I'm watching a video on Intersection Observer and I've copied his script word for word and I'm somehow getting this …

javascript intersection-observer
Use IntersectionObserver with rootMargin to change when reaching 50% viewport height

I'm completely flummoxed by the rootMargin property of intersection observer. My goal is to add a class to an element …

intersection-observer