R
R
RushV2021-06-26 12:15:53
JavaScript
RushV, 2021-06-26 12:15:53

How to track the appearance of a div block?

Hello!
How can you track a div block?
There are, let's say, 4 div blocks with the "post" class.
When the mouse scrolls, the block appears and how are objects tracked in jquery at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-06-26
@delphinpro

Block appearance in viewport or appearance in DOM?
In the first case, track the scroll and compare the scroll amount with the block coordinates.
In the second - MutationObserver

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question