Jquery is a way to jump to a specified location on a page
- 2020-03-30 02:58:45
- OfStack
Offset () (including top left)
The idea is to change the scrollTop of the page.
Jquery animate ()
height()
scrollTop
$("body").scrollTop(**);
The idea is to change the scrollTop of the page.
Jquery animate ()
$("html,body").animate({ scrollTop: **}, 500);
$("html,body").animate({ scrollTop: $().offset().top-$().height() }, 500);