Trust is Good, Observation is Better—Intersection Observer v2
Intersection Observer v2 adds the capability to not only observe intersections per se, but to also detect if the intersecting element was visible at the time of intersection.
An event for CSS position:sticky
Using position: sticky
and IntersectionObserver
together to determine when elements become sticky. Apply scroll effects without scroll events!
css
intersectionobserver
stickyposition
IntersectionObserver’s Coming into View
IntersectionObservers let you know when an observed element enters or exits the browser’s viewport.