/************************************************** Global.css ( ver 1.0.0 ) **************************************************/ //디바이스 체크 getdevice = function(){ if($('#_device_pc').css('display')=='block'){ return 'pc'; }else if($('#_device_ta').css('display')=='block'){ return 'ta'; }else if($('#_device_mo').css('display')=='block'){ return 'mo'; }else{ return null; } } //전역변수 선언 VARS = { 'ani' : { 'speed' : 600, 'easing' : 'easeInOutExpo' } } /************************************************** layout **************************************************/ //AJAX POPUP ajaxpop = { 'init' : function(){ this.action(); }, 'action' : function(){ var $ele = { 'btn' : $('*[data-ajaxpop]'), 'pop' : $(''), 'bg' : $('
') } //open $ele.btn.on({ 'click' : function(e){ e.preventDefault(); var src = $(this).data('ajaxpop'); $('body') .append($ele.bg) .append($ele.pop); $('#popup').load(src,function(){ $('#popup').addClass('on'); $('#popupBG').addClass('on'); }); } }); //close $(document).on('click','#popup .close, #popupBG',function(e){ e.preventDefault(); $('#popup').removeClass('on').remove(); $('#popupBG').removeClass('on').remove(); }) } } $(function(){ ajaxpop.init(); }) //위로가기 버튼 gotop = { 'init' : function(){ this.action(); }, 'action' : function(){ var $ele = { 'btn' : $('#gotop') } $ele.btn.on({ 'click' : function(e){ e.preventDefault(); $('html,body').animate({ 'scrollTop' : 0 },VARS.ani) } }) } } $(function(){ if($('#gotop').length>0){ gotop.init(); } }) /************************************************** main **************************************************/ //visual visual = { 'init' : function(){ this.action(); }, 'action' : function(){ var $ele = { 'roll' : $('.visual .roll') } var rolling = function(){ $ele.roll.slick({ 'fade' : false, //Fade 롤링 효과 'dots' : true, //하단 pager 'arrows' : true, //next,prev 버튼 'infinite' : true, //무한반복 'slidesToShow' : 1, //슬라이드 갯수 'slidesToScroll' : 1, //롤링시 슬라이드 갯수 'autoplay' : true, //자동롤링 'autoplaySpeed' : 4000, //자동롤링 딜레이 'swipe' : false, //모바일 스와프 여부 'centerMode' : false, //Center모드. 가운데 slide에 'slick-active' 클래스 부여. 'centerPadding' : 0, //Center모드인 경우 좌/우 여백 설정 'vertical' : false, //vertical 모드 'zIndex' : 80 //z-index }); } rolling(); } } //partners partners = { 'init' : function(){ this.action(); }, 'action' : function(){ var $ele = { 'roll' : $('.partners .roll') } var rolling = function(){ $ele.roll.slick({ 'fade' : false, //Fade 롤링 효과 'dots' : false, //하단 pager 'arrows' : false, //next,prev 버튼 'infinite' : true, //무한반복 'slidesToShow' : 6, //슬라이드 갯수 'slidesToScroll' : 1, //롤링시 슬라이드 갯수 'autoplay' : true, //자동롤링 'autoplaySpeed' : 2000, //자동롤링 딜레이 'swipe' : true, //모바일 스와프 여부 'centerMode' : false, //Center모드. 가운데 slide에 'slick-active' 클래스 부여. 'centerPadding' : 0, //Center모드인 경우 좌/우 여백 설정 'vertical' : false, //vertical 모드 'zIndex' : 80 //z-index }); } rolling(); } } /************************************************** sub **************************************************/