diff --git a/testpage/fade.js b/testpage/fade.js index a823d6c..656f4c8 100644 --- a/testpage/fade.js +++ b/testpage/fade.js @@ -1,21 +1,21 @@ -// $(function(){ -// $(window).scroll(function() { +$(function(){ + $(window).scroll(function() { -// $('.fadein').each(function() { + $('.fadein').each(function() { -// let scroll = $(window).scrollTop(); + let scroll = $(window).scrollTop(); -// let target = $(this).offset().top; + let target = $(this).offset().top; -// let windowHeight = $(window).height(); + let windowHeight = $(window).height(); -// if (scroll > target - windowHeight + 200) { -// $(this).css('opacity','1'); -// $(this).css('transform','translateY(0)'); -// } -// }); -// }); -// }); + if (scroll > target - windowHeight + 200) { + $(this).css('opacity','1'); + $(this).css('transform','translateY(0)'); + } + }); + }); + }); const ScrollContent = document.querySelectorAll('.scroll'); diff --git a/testpage/test.css b/testpage/test.css index 6e7952c..cbce49c 100644 --- a/testpage/test.css +++ b/testpage/test.css @@ -266,7 +266,6 @@ } } /* ---------------------------------------------------------//mainvisual */ - /* ------------------------------------------------------------home-about */ /* scroll animation */ #home-about .scroll{