3

jquery - keep window from changing scroll position while prepending items to a list?

Maintain the scroll position when prepending content to a list (AngularJS)

Thanks to some SO answers now I know how to keep scroll position using scrollTop property. However, changing its value immediately cancels scrolling inertia and it provides bad experience when new list items are being added frequently.

How can I keep scrolling inertia when I change scrollTop value? Or, is there any alternative way to keep scroll position without this problem?

Community
  • 1
  • 1
Kagami Sascha Rosylight
  • 1,412
  • 1
  • 14
  • 31

0 Answers0