标签:scrollto osi else alert res 事件 static offset function
var resultTop = $(".about-we-nav").offset().top;
$(window).scroll(function () {
if ($(document).scrollTop() >= resultTop-24) {
$(".about-we-nav").css({"top":"24px","position":"fixed"})
} else {
$(".about-we-nav").css({"position":"static"});
// alert(1)
}
});
标签:scrollto osi else alert res 事件 static offset function
原文地址:https://www.cnblogs.com/mmykdbc/p/9054813.html