// 페럴러즈 $(window).resize(function(){ if (window.innerWidth > 1300) { $( function(){ var scrollTop = $(window).scrollTop(); function lol( $this ) { var translate = (scrollTop - $($this).data('orig-offset')) / $(window).height() * 25; $($this).css({transform: 'translate3d(0,' + translate +'%'+', 0)'}); } $('.parallax-text').each( function() { $(this).data('orig-offset', $(this).offset().top); lol( $(this) ); }); $(window).scroll( function() { scrollTop = $(window).scrollTop(); $('.parallax-text').each( function() { lol( $(this) ); }); }); $(window).on('resize', function () { scrollTop = $(window).scrollTop(); $('.parallax-text').each( function() { $(this).data('orig-offset', $(this).offset().top); lol( $(this) ); }); }); }); } }).resize(); //페럴러즈 마감 //애니메이션 const options = { root: null, rootMargin: "0px", threshold: .5, } const observer = new IntersectionObserver(entries => { entries.forEach(entry => { console.log(entry.isIntersecting); if (entry.isIntersecting) { entry.target.classList.add("wiz_active"); } //else { //반복할시 풀자 // entry.target.classList.remove("wiz_active"); // } }); }, options); const titleList01 = document.querySelectorAll('.wiz_animation'); titleList01.forEach(el => observer.observe(el)); const observer2 = new IntersectionObserver(entries2 => { entries2.forEach(entry2 => { console.log(entry2.isIntersecting); if (entry2.isIntersecting) { entry2.target.classList.add("wiz_active"); } else { //반복할시 풀자 entry2.target.classList.remove("wiz_active"); } }); }, options); const wiz_swiper = document.querySelectorAll('.wiz_swiper'); wiz_swiper.forEach(el => observer2.observe(el));