I have a div with the following CSS properties, in order to have it scroll in place:
height: 746px;
width: 295px;
overflow: auto;
margin-bottom: 11px;
position: relative;
I need to do two seperate things with jQuery:
- onclick of a button, scroll the box up by 100px.
- upon reaching the bottom of the box when scrolling, fire a function.
I've tried using both .position()
and .offset()
to get where it is now, but neither are updating the position when it's scrolling. What am I doing wrong?