$(function(){ const bbsnew = $('.bbsnewf5') for ( i=0; i a').removeAttr('href') console.log(window.innerWidth) console.log(window.outerWidth) // »çÀÌÁî Á¶Àý const imgSize = $('.bbsnewf5 table tbody tr:first-child td img').width() if ( window.innerWidth < 671 ) { $('.extraDom').width(imgSize-20) } else { $('.extraDom').width(imgSize-40) } $('.cateWrapper').width(imgSize) // img wrapper °¨½ÎÁÖ±â $('.bbsnewf5 table tbody tr:first-child td a img ').wrap('
') }) // â Å©±â º¯°æ½Ã $( window ).resize(function() { // »çÀÌÁî º¯°æ const imgSize = $('.bbsnewf5 table tbody tr:first-child td img').width() if ( window.innerWidth < 671 ) { $('.extraDom').width(imgSize-20) } else { $('.extraDom').width(imgSize-40) } $('.cateWrapper').width(imgSize) }); //»ó¼¼ Á¤º¸ ±×·ÁÁÖ±â function createBox(e, index) { const extras = $(e).find(' .gallery_etc font') if ( extras.length === 0) return true; const dom = $('
') const cateWrapper = $('
') const cate = $('
') const iconWrapper = $('
') dom.append(iconWrapper) let font extras.each(function (i, extra){ let ex = $(extra).html() let title = ex.split(':')[0].trim() let content = ex.split(':')[1].trim() if ( title === "ºÐ¾çÁ¤º¸" ) { // ÀÎÄÚµù ¹®Á¦·Î Çѱ۱úÁ®¼­ À妽º·Î ó¸® // if ( i === 4 ) { // ºÐ¾çÁ¤º¸ let cateText = "" switch (content) { case "ºÐ¾ç¿¹Á¤" : cateText = "before" break; case "ºÐ¾çÁß" : cateText = "ing" break; case "ºÐ¾ç¿Ï·á" : cateText = "finish" break; } cate.append('
'+content+'
') return true; } else if ( title === "°ø»çÁ¤º¸" ) { // ÀÎÄÚµù ¹®Á¦·Î Çѱ۱úÁ®¼­ À妽º·Î ó¸® // if ( i === 4 ) { // ºÐ¾çÁ¤º¸ let cateText = "" switch (content) { case "ÀÓ´ëÁß" : cateText = "before" break; case "°ø»çÁß" : cateText = "ing" break; case "°ø»ç¿Ï·á" : cateText = "finish" break; } cate.append('
'+content+'
') return true; } const wrapper = $('
') const titleDom = $('
') const contentDom = $('
') titleDom.append(title); contentDom.append(content); wrapper.append(titleDom); wrapper.append(contentDom); dom.append(wrapper) }) cateWrapper.append(cate) $(e).find('table tbody tr:first-child td').append(dom) $(e).find('table tbody tr:first-child td').append(cateWrapper) }