$(function(){ tl = TweenMax; //헤더메뉴 tl.staggerFromTo($("#wrap header .gnb.depth1 > li > a p span"), 0.7, {opacity: 0, y: '100%',rotation:'0.001deg'}, {opacity: 1, y: '0%', delay:1.2, ease: Power1.easeInOut}, .05); $.each($(".fullpage .title_g"), function(i, v){ var mainText = $(this).find(".title.pc_view"); var animatedMainT = $(this).find(".title.pc_view").text().split(""); mainText.empty(); $.each(animatedMainT, function(i, v) { mainText.append($("").text(v)); }); }); //fullpage var $fullpage = $('.fullpage'); var main_fullpage_slider = new Swiper($fullpage, { effect: "slide", autoplay: { delay: 5000, }, slidesPerView: 'auto', speed:1100, parallax: true, loop:true, mousewheel: { releaseOnEdges: true }, allowTouchMove:false, simulateTouch:false, grabCursor: false, touchStartPreventDefault:false, mousewheelControl: true, watchSlidesProgress: true, watchSlidesVisibility: true, navigation: { nextEl: '.arrows .btn_next', prevEl: '.arrows .btn_prev', }, pagination: { el: '.fullpage_pagination .pagination', clickable: true, renderBullet: function (index, className) { return '
'+ ''+ ''+ ''+ ''+ ''+ '
0'+(index+1)+'
'+ '
' } }, breakpoints: { 1279: { allowTouchMove:true, simulateTouch:true, grabCursor: true, }, }, on: { init: function () { }, slideChangeTransitionEnd: function () { }, touchEnd: function(){ }, transitionStart : function () { var secNum = this.activeIndex +1; $('.section'+secNum).addClass('on'); tl.staggerFromTo($(".fullpage .swiper-slide-active .title_g .title.pc_view span"), 0.9, {opacity: 0, x: '50px',rotation:'0deg'}, {opacity: 1, x: '0%',rotation:'0deg', delay:0.7, ease: Power1.easeInOut}, .03); $(".fullpage_wrap .pagination .dot circle").stop().velocity({ 'stroke-dashoffset': 200 }, { delay:0, duration: 0 }).velocity({ 'stroke-dashoffset': 200 }, {delay:0, duration: 0 }); $(".fullpage_wrap .pagination .dot.swiper-pagination-bullet-active circle").stop().velocity({ 'stroke-dashoffset': 200 }, {delay:700, duration: 0 }).velocity({ 'stroke-dashoffset': 0 }, {delay:700, duration: 800 }); if($('.sec1').hasClass('swiper-slide-active')){ $('.sec_cate p').html('01future'); }else if($('.sec2').hasClass('swiper-slide-active')){ $('.sec_cate p').html('02work'); }else if($('.sec3').hasClass('swiper-slide-active')){ $('.sec_cate p').html('03potential'); } if($('.section.end').hasClass('swiper-slide-visible')){ tl.staggerFromTo($(".fullpage_wrap .copyright span"), 0.6, {opacity: 0, y: '100%'}, {opacity: 1, y: '0%', delay:1.5, ease: Power1.easeInOut}); }else{ tl.staggerFromTo($(".fullpage_wrap .copyright span"), 0.4, {opacity:0, y: '0%'}, {opacity: 0, y: '110%', ease: Power1.easeInOut}); } }, slideChange: function () { }, } }); //start motion tl.staggerFromTo($(".fullpage_wrap .sec_cate"),1.1, {opacity: 0, x: '0%'}, {opacity: 1, x: '0%', delay:1.5, ease: Power1.easeInOut}); tl.staggerFromTo($(".fullpage_wrap .arrows"),1.1, {opacity: 0, x: '0%'}, {opacity: 1, x: '0%', delay:1.5, ease: Power1.easeInOut}); tl.staggerFromTo($(".fullpage_wrap .pagination .dot"),0.7, {opacity: 0, y: '110%'}, {opacity: 1, y: '0%', delay:2.2, ease: Power1.easeOut},0.2); });