Scroll to top after Ajax content load

后端 未结 4 1376
执念已碎
执念已碎 2020-12-31 08:21

Is there anyway that I can make it so the page will automatically scroll to the top after the content has loaded (via Ajax)?

This is the code I have for displaying

4条回答
  •  盖世英雄少女心
    2020-12-31 08:58

    All ajax requests have a callback argument so use scrollTop(0). Check the jQuery documentation on how to use ajax callbacks.

提交回复
热议问题