Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
40
rated 0 times [  41] [ 1]  / answers: 1 / hits: 16066  / 11 Years ago, tue, february 26, 2013, 12:00:00

My application has a textarea (html) field with the following css



.textareaCss{overflow: auto;width:500px; height:15px; margin:0; padding:5px; margin-top:4px; margin-bottom:5px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; border:#d9d9d9 solid 1px;color: #999;}


Now the effect is, if the user's comment grows such that the content typed is occupying more space than what height of 15px can accomodat, then the scroll bar appears and user cant see the first line as shown



enter



Is it possible that the height of the textarea grows such that the whole content is always seen.
PleaseNote: Anyhow the limit of characters is 1000.


More From » jquery

 Answers
17

The answer is as follows
1. Download the pluging autogrow.js Autogrow js from GitHub



And then add it to your code and give the reference respectively.



Then add the code as below



$(function() {
$('#txtMeetingAgenda').autogrow();
});

[#80001] Sunday, February 24, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lidialyrick

Total Points: 737
Total Questions: 104
Total Answers: 89

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
;