이 라이브러리를 사용했습니다 : http://www.jacklmoore.com/autosize/
사용하려면 아래와 같은 구문을 사용해야합니다.
autosize($('textarea#description'));
또는 다른 자바 스크립트 선택기. 하지만 내 텍스트 영역이 ajax에 의해로드되고 작동하지 않습니다.
ajax 요소와 함께 작동하는 다른 선택기가 있습니까? 감사합니다
jquery 선택기를 감싸고 .find()
범위를 좁히는 데 사용 하십시오.
$.ajax({...}).done(function(responseHTML){
// depending on what the function is doing you may need to append it to the body first.
$(responseHTML).appendTo('body'); // or wherever you want to put it
$textarea = $(responseHTML).find('#description');
autosize($textarea);
});
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다