// document.domain = 'card.co.kr'; // ¸ð¹ÙÀÏ ¸Þ´º ¿­°í ´Ý±â $('.btn_nav').click(function(e){ if( $(this).hasClass('open')) { $(this).removeClass('open'); $('.gnb, .lnb').height('auto'); } else { $('.gnb, .lnb').height(0); $(this).addClass('open'); } e.preventDefault(); }); /* lnb ¸Þ´º ¸¶¿ì½º ¿À¹ö È¿°ú */ $(document).ready(function(){ var obj = $(".sub_menu .on").attr("class"); if(obj){ var len = obj.length; $(".sub_menu a").hover(function(){ //$(".sub_menu a").removeClass("on"); }, function(){ //$(".sub_menu a").removeClass("on"); $(".active").addClass("on"); }); } $('.to_top a').click(function(e){ e.preventDefault(); $(window).scrollTop(0); }); $('textarea') .addClass('placeholder') .each(function () { $(this).val($(this).attr('placeholder')); }) $('textarea').bind({ 'focus': function () { var placeholder = $(this).attr('placeholder'); $(this).removeClass('placeholder'); if ($(this).val() == placeholder) { $(this).val(''); } }, 'blur': function () { var placeholder = $(this).attr('placeholder'); if ($(this).val() == '') { $(this).val(placeholder).addClass('placeholder'); } } }); }); //Ä«µå ¸µÅ© Ŭ¸¯½Ã È­¸é Ãâ·Âº¯°æ $("a[class^=click_]").on('click',function(){ var val = $(this).attr('class').replace('click_',''); // var val = $(this).attr('class').split('_')[1]; val = val.replace(" on",""); if(val){ $(document).attr('location','http://card.co.kr/?card='+val); } }); function modal_open(modalName) { // ¸ð´Þ ¿­±â °øÅë modal = $(modalName); // ¸ð´Þâ ID°ªÀ¸·Î ¿­±â $(modal).stop().show(); //$('#bodyWrap').css({'top':'0','position':'fixed','width':'100%'}); // ½ºÅ©·Ñ¹Ù ¸·°í, »çÀÌÁî °íÁ¤ } function modal_close() { // ¸ð´Þ ´Ý±â °øÅë $('.modal').hide(); // $('#bodyWrap').css({'top':'','position':'','width':''}); } function modal_open2(val){ $("#filename").attr('placeholder',val); var cookiedata = document.cookie; if(cookiedata.indexOf("modal_pop=1") < 0){ $(".modal").show(); }else{ $(".modal").hide(); } } function modal_open3(val){ var name = navigator.appName, ver = navigator.appVersion, ver_int = parseInt(navigator.appVersion), ua = navigator.userAgent, infostr; if(ver.indexOf("MSIE 9.0") != -1 || ver.indexOf("MSIE 8.0") != -1 || ver.indexOf("MSIE 7.0") != -1){ if(document.getElementById('ie_input').value==''){ ie_file_upload(); }else{ modal_open2(val); } }else{ modal_open2(val); } } function ie_file_upload(){ //alert(document.domain); var frm = document.getElementById('cardfrm'); frm.target = 'ie_upload_frame'; frm.action = '/save/index.php?p=ie9'; frm.submit(); } function SelectText(element) { var text = document.getElementById(element); if ($.browser.msie) { var range = document.body.createTextRange(); range.moveToElementText(text); range.select(); } else if ($.browser.mozilla || $.browser.opera) { var selection = window.getSelection(); var range = document.createRange(); range.selectNodeContents(text); selection.removeAllRanges(); selection.addRange(range); } else if ($.browser.safari) { var selection = window.getSelection(); selection.setBaseAndExtent(text, 0, text, 1); } }