1

I have a page where there is a vertical list of divs:

<div class="project" id="project-1">
   ...
</div>
<div class="project" id="project-2">
   ...
</div>

Content of each div is high enough so you can view only 1 div in your browser at once.

I'd like to know the ID of the div you're viewing after scrolling down, or rather to know the ID of the div than $(window).scrollTop() just exceeded the top position.

Here is a quick sketch as I guess that my explanations are not really clear.

sketch

Could somebody help me, please?

0 Answers0