Suppose I have div and I want to fetch data and push data into that div. When the user scrolls within the div, the next set of data will be fetched and pushed into the div.
I think .scrollTop() is your weapon of choice. jQuery API
Get the current vertical position of the scroll bar for the first element in the set of matched elements.
So make sure to bind it to the right element. Directly on the div should work I guess.
The vertical scroll position is the same as the number of pixels that are hidden from view above the scrollable area. If the scroll bar is at the very top, or if the element is not scrollable, this number will be 0.
So probably you've to find a way to calculate the height of the div as if it would be stretched without scrollbar to put these to numbers in a meaningful relation to shoot of the loading event.