When the document is longer than the computer screen, the browser can only view part of it, which is equivalent to a viewfinder. The distance from this frame to the top of the document is scrollTop
$(document).scrollTop() returns the height of the current web page when it is scrolled; $('#js_productWrap').offset().top returns the height of the target element from the top of the document
When the document is longer than the computer screen, the browser can only view part of it, which is equivalent to a viewfinder. The distance from this frame to the top of the document is scrollTop
$(document).scrollTop() returns the height of the current web page when it is scrolled;
$('#js_productWrap').offset().top returns the height of the target element from the top of the document