if(navigator.userAgent.indexOf("MSIE 7") > 0) { $( 'body, html' ).css({ overflow: 'auto' }); } else if(navigator.userAgent.indexOf("MSIE 8") > 0) { // IE 8.x } else { function ciss_mobile_menu(a) //모바일메뉴 { var $top1Size = $('#top1menu>li').size(); for (i=1;i<=$top1Size;i++){ //$('.top1m'+i).attr("name",$('.top1m'+i).attr("href")); $('.top1m'+i).attr('href', '#n'); } $('#top1menu>li>a').click(function() { $(this).next('div').toggle(); }); } function ciss_pc_menu(a) //PC 메뉴 { var $top1Size2 = $('#top1menu>li').size(); for (i=1;i<=$top1Size2;i++){ $('#top1m'+i).attr("href",$('#top1m'+i).attr("name")); } } //메인 사이즈 $("document").ready(function(){ //alert($(window).width()); if ( $(window).width() > 987){ ciss_pc(); ciss_pc_menu(); } else { ciss_mobile(); ciss_mobile_menu(); } }); $(window).resize(function() { if ( $(window).width() > 987){ ciss_pc(); ciss_pc_menu(); } else { ciss_mobile(); ciss_mobile_menu(); } }) function ciss_pc(){ // 988 이상 $('.wrapper').css('left','0'); $( 'body, html' ).css({ overflow: '' }); $('.toolbar').hide(); var $top1Size = $('#top1menu>li').size(); for (i=1;i<=$top1Size;i++) { $('.top1m'+i).attr({id:"top1m"+i}); $('.top2m'+i).attr({id:"top2m"+i}); $('#top1m'+i).removeClass('top1m'+i); $('#top2m'+i).removeClass('top2m'+i); } $('#lnb .top2m').hide(); } function ciss_mobile(){ // 988 이하 $('.toolbar').show(); var $top1Size = $('#top1menu>li').size(); for (i=1;i<=$top1Size;i++) { $('#top1m'+i).addClass('top1m'+i); $('#top2m'+i).addClass('top2m'+i); $('#top1m'+i).removeAttr('id'); $('#top2m'+i).removeAttr('id'); } $('#lnb .top2m').hide(); $('#lnb .top1m1').next('.top2m').show(); //$('.default_write colgroup col').remove(); //수정 2019-04-18 김흥교 } //모바일메뉴 $("document").ready(function(){ $(".toolbar a ").click(function() { $('#lnb').animate( { right : 0 }, 500); $('.wrapper').animate( { left : -230 }, 500); $( 'body, html' ).css({ overflow: 'hidden' }); $( '.mask' ).show(); $('.wrapper').animate( { left : -230 }, 500); $('.toolbar').hide(); $('.lnb_close').animate( { right : 230 }, 500).show(); }); $(".mask, .lnb_close").click(function() { $('.wrapper').animate( { left : 0 }, 500); $('#lnb').animate( { right : -230 }, 500); $( 'body, html' ).css({ overflow: '' }); $( '.mask' ).hide() $('.wrapper').animate( { left : 0 }, 500); $('.toolbar').show(); $('.lnb_close').animate( { right : -230 }, 500).hide(); }); }); /* 게시판 */ function addCellHeader(table) { if (!table) { return false; } var trs = table.getElementsByTagName('tr'); var trsChild; var grid = {}; var cells; for (var i = 0, cntI = trs.length; i < cntI; i++) { if (!grid[i]) { grid[i] = {}; } trsChild = trs.item(i).childNodes; cells = 0 for (var j = 0, cntJ = trsChild.length; j < cntJ; j++) { if (trsChild[j].nodeType == 1) { grid[i][cells++] = trsChild[j]; } } } $(".bbs_default_list tr:odd").addClass("odd"); $(".bbs_default_list tr:even").addClass("even"); var cellHeader = ''; for (row in grid) { if (row == 0) { continue; } for (cell in grid[row]) { if (cell == 0) { continue; } //cellHeader = grid[0][cell].innerHTML + ' - ' + grid[row][0].innerHTML cellHeader = grid[0][cell].innerHTML + ':' ; grid[row][cell].setAttribute('data-cell-header', cellHeader); } } } }