Trial Priority
I created infinite scrolling
My HTML Code
<div id="Container">
// search results goes here
</div>
To add data to the end
$(oneTuple).appendTo("#Container"); //oneTuple is information of one tuple of search results page
Prepare
$(oneTuple).appendTo("#Container");
Question: When I add data using appendTo, it changes the cursor position. Can I make sure my cursor doesn't change even if I add data
+3
Shalini honey singh
source
to share
1 answer
One way is to calculate the current scroll position of ScrollTop (), then add / add data, calculate the difference in the current and previous scroll position, then use the ScrollTo () method to scroll to the end.
0
MiiinimalLogic
source
to share