Jquery get and set document offset (or position?)

How can I get my actual scroll of a document and then set it after some event? I would like to receive how my page scrolls, and after some event returns to this position. thnk

+3
source share
1 answer

You can use $(window).scrollTop()to get the current vertical scroll and set it with $(window).scrollTop(value).

+9
source

Source: https://habr.com/ru/post/1776935/


All Articles