I have an unordered list that is a child in a smaller parent div and is scrolled within the first div. How would I select the <li>
that is currently visible within the first div's window?
What I have tried is using the jQuery offset coordinates of the parent container and elementFromPoint which I got from here
xcoo = $('#menuholder1').offset().left;
ycoo = $('#menuholder1').offset().top;
clickedID = document.elementFromPoint(xcoo, ycoo).id;
However, this is returning the element one item higher. So I tried just adding to ycoo but then it returns nothing.
Does anyone have another solution to this? The page in question is http://do.right.by