사이트 활용팁

댓글 입력폼 높이 변경 하기

아래의 파일명 및 소스코드 참조

// view_comment.skin.php
// this.style.minHeight = '150px'; 를 this.style.minHeight = '65px'; 로 변경
<textarea id="wr_content" name="wr_content" maxlength="10000" required title="댓글" placeholder="댓글 내용을 입력해주세요." onkeyup="check_byte('wr_content', 'char_count');" <?php if ($is_guest) { ?>style="padding-bottom:60px !important;"<?php } ?>><?php echo $c_wr_content; ?></textarea>
...
...
...
    $(document).ready(function() {
        $('#wr_content').on('input', function() {
            this.style.height = 'auto'; /* 높이를 자동으로 설정합니다. */
            this.style.height = (this.scrollHeight) + 'px'; /* 스크롤 높이를 textarea에 적용합니다. */
            this.style.minHeight = '150px';
        });
    });

// style.css 파일
// height : 150px 를 65px 로 변경
.rb_bbs_wrap .bo_vc_w textarea {font-size:14px !important; border-radius: 0px; resize: none; height:150px; margin-top: 30px; background-color: #f9f9f9; padding: 15px !important; padding-right: 70px !important; box-sizing: border-box; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border:1px solid #ddd; font-size: 16px; color:#000; box-shadow: none; line-height: 100%; overflow: hidden;}
이전글 상단 메뉴에 새글 아이콘 노출 하기
다음글 뱃지 및 강조할 내용 추가
Warning: include_once(/volume4/web/rebuilder/theme/main/skin/board/main_board/view_comment.skin.php): Failed to open stream: No such file or directory in /volume4/web/rebuilder/bbs/view_comment.php on line 127 Warning: include_once(): Failed opening '/volume4/web/rebuilder/theme/main/skin/board/main_board/view_comment.skin.php' for inclusion (include_path='/volume4/web/rebuilder/plugin/htmlpurifier/standalone:.:/usr/share/pear') in /volume4/web/rebuilder/bbs/view_comment.php on line 127