$(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(); allmenuJS(); $(".scroll_top").hide(); function checkOffset() { var a=$(document).height()-$(window).height(); var b=$('footer').height(); scroll = $(window).scrollTop(); if (scroll > a-b) { $(".scroll_top").css("position","absolute"); }else { $(".scroll_top").css("position","fixed"); } } $(document).ready(checkOffset); $(document).scroll(checkOffset); $(window).scroll(function(){ if($(this).scrollTop() > 20){ $(".scroll_top").fadeIn(200); }else { $(".scroll_top").fadeOut(200); } }); $(".scroll_top").on("click",function(){ $("body,html").animate({scrollTop:0},300); }); $("#wrap header .lang .icon").on("click",function(){ $(this).next().slideToggle(200); }); /* 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'); }); function allmenuJS(){ $(".menu").on("click",function(){ $("#allmenu").slideDown(300); $("body").addClass("all"); }); $(".close").on("click",function(){ $("#allmenu").slideUp(300); $("body").removeClass("all"); }); }