Resize text area to fit all text on load jquery

Posted by CR41G14 on Stack Overflow See other posts from Stack Overflow or by CR41G14
Published on 2012-10-26T10:39:05Z Indexed on 2012/10/26 23:01 UTC
Read the original article Hit count: 227

Filed under:
|

I understand there has been a lot of discussion on this but I have yet to find a solution to fix my needs. Basically I need to autogrow a text area not when you type but on load. I am pulling in content from a database and dependant on the user's settings an overlay is produced over the text area, but upon doing this the text areas are not scrollable therefore I need to autosize these to show all the text.

I have tried scrollHeight but this is not working great as there are multiple text boxes on the screen

Thanks

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery