개발기록/JAVA SCRIPT 사진클릭시 새창에서 이미지열림 이불감고돌돌 2017. 4. 11. 13:43 $('.aaa img').each(function(){ var thisSrc = $(this).attr('src'); var thisObj = $(this).parent('a'); if( thisObj.length ) { thisObj.attr('target', '_blank'); } else { $(this).wrap(''); } }); //안의 '' 모두 지우고 사용 <div class="aaa"> <?php echo $aaa->content_text;?> </div>