$(document).on('click', 'a[href="#none"]', function(e) { e.preventDefault(); }); //기본js function startJs(){ $(document).on('click', 'a[href="#none"]', function(e) {e.preventDefault()}); if($('html').is('.ie67, .ie7, .ie8, .ie9')) { $('div.ie_alert_text').show().html('현재 사이트는 IE9 미만의 하위브라우저를 지원하지 않습니다.
브라우저를 최신 버전으로 업데이트해 주세요.'); } WebFont.load({google: {families: ['Noto Sans KR', 'Montserrat']}}); } function popup() { //레이어팝업 var bg = $("#bg"); $(document).on('click',' #bg, .close ', function () { bg.fadeOut(); $('div[id*="-popup"] div.inner').html(''); $('div[id*="-popup"]').hide(); }); $(document).on('click','.layer-', function () { var ClassName = $(this).data('link'); bg.show(); $('#layer-popup').show(); $('#layer-popup').html( ''+ '
'+ '
' ); //foot 메뉴 클릭시 switch (ClassName) { case "privacy1": $("#layer-popup div.inner").load("/_privacy1.php"); break; case "terms": $("#layer-popup div.inner").load("/_terms.php"); break; } }); //click } $(function(){ startJs(); popup(); /* scroll */ var $animation_elements = $('.ani'); var $window = $(window); function check_if_in_view() { var window_height = $window.height(); var window_top_position = $window.scrollTop(); var window_bottom_position = (window_top_position + window_height); $.each($animation_elements, function() { var $element = $(this); var element_height = $element.outerHeight(); var element_top_position = $element.offset().top+200; var element_bottom_position = (element_top_position + element_height); //console.log(element_top_position); //check to see if this current container is within viewport if ((element_bottom_position >= window_top_position) && (element_top_position <= window_bottom_position)) { $element.addClass('in-view'); } else { //$element.removeClass('in-view'); } }); } $window.on('scroll resize', check_if_in_view); $window.trigger('scroll'); var $header = $("#wrap header"); var $slideNav = $("#wrap header #nav .gnb>li"); var $slideNav2 = $("#wrap header #nav .gnb>li>ul"); var $allMenu = $("#wrap header .all_menu"); //메뉴 호버시 메뉴 슬라이드 $slideNav.hover(function(){ $slideNav.removeClass("on"); $slideNav2.stop().slideUp(); }) $slideNav.mouseover(function(){ $(this).addClass("on").siblings().removeClass("on"); $(this).find("ul").stop().slideDown().parent().siblings("").find("ul").stop().slideUp(); }); //올메뉴 클릭 이벤트 $("#wrap header .right_nav .menu_wrap").click(function(){ $header.toggleClass("active"); if($header.hasClass("active")){ $allMenu.stop().slideDown(); $("body").addClass('overhidden'); gsap.to("#wrap header .all_menu .all_gnb>li", {duration: 0, y:0, stagger: 0.2,opacity:1}); }else { $allMenu.stop().slideUp(); $("body").removeClass('overhidden'); gsap.to("#wrap header .all_menu .all_gnb>li", {duration: 0, y:-10, stagger: 0,opacity:0}); } }); });