diff --git a/src/main/webapp/visitEdu/usr/publish/script/content.js b/src/main/webapp/visitEdu/usr/publish/script/content.js index 10488f72..f25eae77 100644 --- a/src/main/webapp/visitEdu/usr/publish/script/content.js +++ b/src/main/webapp/visitEdu/usr/publish/script/content.js @@ -1067,3 +1067,42 @@ $(function(){ /* 날짜 및 시간 입력 시 자동 작성 스크립트 */ + $(document).ready(function () { + + boardCaptionToggle(); + boardCaptionToggle02(); + + }); + + function boardCaptionToggle() { + var bdWid = $("body").width(); + var thLength = $(".tb_type01 th").length; + if (bdWid > 640) { + var subTit = $(".tb_tit01_left p").text() + var itmText = ""; + $(".tb_type01 th").each(function (index, item) { + itmText += $(item).text(); + if (index === thLength - 1) { + /* 마지막 th일 경우 - ,가 들어가면 안됨. */ + itmText; + } else { + itmText += ", "; + } + }); + if ($(".tb_type01 caption").length == 0) { + if(subTit.indexOf("목록") != -1){ + $(".tb_type01>table").prepend("