I am trying to get scroll position after I click on anchor (internal click).
$(".nav-link").click(function(){
console.log($(window).scrollTop());
});
But the value is the one of the position before the scroll is done. How can I get the value when the event is completed?
答案 0 :(得分:0)
window.onhashchange = function () {
console.log($(window).scrollTop());
};