0
나는 jquery가있는 http://editions.redbullusa.com과 비슷한 수직 스크롤 웹 페이지를 만들려고합니다. 아래의 스크립트를 보았습니다. 페이지를 스크롤하면서 요소를 올바르게 페이드 인 할 수 있지만, 다음 요소가 위치로 스크롤 될 때 이전 요소가 사라지도록하고, 뒤로 스크롤하면 페이드 인합니다 올바른 요소는 본질적으로 스크립트를 역전시킵니다.수직 시차 페이지 만들기
slides = $('.slide');
slides.children().fadeTo(0, 0);
$('#slide-1').children().fadeTo(1000, 1);
$(window).scroll(function(d,h) {
slides.each(function(i) {
a = $(this).position().top + $(this).height();
b = $(window).scrollTop() + $(window).height();
if (a < b) {
$(this).addClass('current');
$(this).children().fadeTo(1000,1);
$(this).children('.polaroid').addClass('fadeInRightBig');
$(this).siblings().removeClass('current');
}
});
});
나는 이런 일이 발생하는 방법에 관해서 정말로 실망하고 있습니다. 나는 누군가가 나를 도울 수 있기를 바라고 있습니다. 내가 놀고있는 사이트는 http://interesponse.com/curryacura/index2.php