if(navigator.userAgent.indexOf("MSIE 7") > 0) { // IE 7.x } else if(navigator.userAgent.indexOf("MSIE 8") > 0) { // IE 8.x } else { //메인 사이즈 $("document").ready(function(){ if ( $(window).width() > 987){ ciss_pc(); } else if ( $(window).width() > 640){ ciss_tablet() ; } else { ciss_mobile(); } }); $(window).resize(function() { if ( $(window).width() > 987){ ciss_pc() } else if ( $(window).width() > 640){ ciss_tablet() } else { ciss_mobile() } }) function ciss_pc(){ // 988 이상 $('#total_menu').hide(); $('#target ul').css({"margin-left" : 663 }); $('#target ul div.tabcontent').css({"left" : -500 }); //배경 위치 var bgwidth = Math.ceil( ($(window).width() - 1062)/2 ); bp = ( (bgwidth+666) % 25); bp = 25 - bp; $('#header .active').css({"background-position-x" : -bp}); $('#header .header_v').css({"background-position-x" : -bp}); } function ciss_tablet(){ // 988이하 $('#notice_pop').hide(); var tm = $(window).width() - 358; $('#target ul').css({"margin-left" : tm-2 }); $('#target ul div.tabcontent').css({"left" : -(tm-125) }); } function ciss_mobile(){ // 640이하 //var mask_h = ($(window).height() - 350); //$('.mask').css({"height" : mask_h }); $('#notice_pop').hide(); var tm = ($(window).width() - 315)/2; $('#target ul').css({"margin-left" : tm }); $('#target ul div.tabcontent').css({"left" : -(tm-0) }); } //모바일메뉴 $("document").ready(function(){ $(".toolbar a").click(function() { $('#total_menu').slideDown(); }); $(".totalmenu_close").click(function() { $('#total_menu').slideUp(); }); }); /* 게시판 */ 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); } } } }