Reputation: 256
I'm trying to dynamically create, already filled, textarea using JQuery. I have a problem with making it's height to fit the content of given 'question'. Does someone have an idea how to solve it? I would be grateful.
questionHolder = document.createElement("textarea");
questionHolder.value = question;
Cheers!
Upvotes: 0
Views: 19
Reputation: 252
Textarea
has a rows
attribute. Try searching for it.
question.setAttribute('rows','5')
Upvotes: 1