有人可以帮我处理这个 JavaScript 吗?
我想div
在您向下滚动超过 1000 像素时显示,目前它适用于下面的脚本,但在滚动时会立即显示。
我试着设置它>1000
,它根本不显示?
有任何想法吗?
$(window).scroll( function(){
/* Check the location of each desired element */
$('.hideme').each( function(i){
/* If the object is completely visible in the window, fade it in */
if ($(this).scrollTop() < 1000){
$(this).animate({'opacity':'1'},900);
}
});
});