Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道在锚点跳转后是否有可能获得$(this).scrollTop()值。Firefox 管理它......但是 IE 返回 0,因为它在页面可以跳转到锚点之前检索值(在页面加载时)。
提前谢谢了。
我不得不使用超时功能
setTimeout(function(){ IEScrollTop($(window).scrollTop()); }, 100);
这给了我正确的 scrollTop() 值。感谢@nickdos