누구든지이 자바 스크립트를 도와 줄 수 있습니까?jQuery .scrollTop confusion
1000 픽셀 이상 아래로 스크롤 할 때 div
을 표시하려면, 현재 아래 스크립트에서 작동하지만 스크롤 할 때 바로 표시됩니다.
>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);
}
});
});
유 제발 그것과 함께 당신의 CSS를 포함 할 수 있습니다. –