The jQuery aminate method locates the page

  • 2020-03-30 01:07:27
  • OfStack

Through jQuery's aminate animation method positioning.

Here's an example:
 
scrollOffset($("#qa").offset()); 

//JQuery positions the scrollTop of the body to be equal to the top of the pos
function scrollOffset(scroll_offset) { 
$("body,html").animate({ 
scrollTop: scroll_offset.top - 70 
}, 0); 
} 

Related articles: