I have HTML like this:
<div class="cont">
<!-- some elements -->
<div class="child fixed">Child</div>
</div>
child
is with position fixed
(class fixed
). Inside cont
there are another elements, which make it with higher height than child
.
I have scroll event on document:
$(document).scroll(function(e) { ... }
I want when some1 scroll and child is at the bottom of cont
to remove fixed
class.
How can I detect on scroll (document
scroll) that some element is at the bottom of some parent element (I mean when bottom of the child
is in the same position as its parent cont
.) ?
Edit
@devlincarnate this is not "how to check is it last child" question.