Detect is child container at the bottom of the parent - jQuery : 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 ?

