0
사용자가 전체 창 높이를 스크롤하기 전에 실행을 중지하려고하지만 콘솔에 표시되는 내용이 합산되지 않습니다. 어떻게 든 scrollHeight (scrollTop 값)는 윈도우 자체의 높이보다 더 커지게됩니다. 이것이 어떻게 가능한지?스크롤 높이가 창 높이보다 큰 이유는 무엇입니까?
$(document).ready(function() {
var windowHeight = $(window).height();
if($(window).width() > 720 && $(window).scrollTop() < (windowHeight-400)) {
$(window).bind('scroll', function(){
var scrollHeight = $(window).scrollTop();
console.log('scroll height', scrollHeight)
console.log('window height', windowHeight)
function parallaxScroll(){
$('#main').css('top',(500-(scrollHeight*2))+'px');
};
parallaxScroll();
});
}
});