$(function(){ $("#section1").removeClass("on").addClass("on"); $('#fullpage').fullpage({ navigation: true, responsiveWidth: 1400, scrollingSpeed: 1400, onLeave: function(anchorLink, index){ if(index == 1){ $("#section1").addClass("on"); }else{ $("#section1").removeClass("on"); } if(index == 2){ } if(index == 3){ } if(index == 4){ } if(index == 5){ $("#btn_top").fadeIn(); $("#scroll").fadeOut(); }else{ $("#btn_top").fadeOut(); $("#scroll").fadeIn(); } }, afterSlideLoad: function(anchorLink, index){ }, }); $(document).on('click', '#btn_top', function(){ $('body,html').animate({scrollTop: 0}, 200); $('#fullpage').fullpage.moveTo(1); }); /* main visual var mainSwiper = new Swiper('.visual', { direction: 'horizontal', effect:'fade', speed: 1500, loop: true, autoplay: { delay: 5000, disableOnInteraction: true, }, pagination: { el: '.swiper-pagination', type: 'fraction', }, keyboard: { enabled: true, onlyInViewport: false, }, navigation: { nextEl: '.vnext', prevEl: '.vprev', }, }); */ })