I have textarea, which will be auto-populated on page load. I'm trying to increase its height based of content loaded.
This is what i'm trying to do,
JS :
$('#xyz').text('dynamic content').attr('disabled',true);
textAreaModalAdjust(document.getElementById('xyz'));
function textAreaModalAdjust(o) {
o.style.height = "1px";
setTimeout(function() {
o.style.height = (25+o.scrollHeight)+"px";
}, 1);
}
Even, i tried without "setTimeout", no luck.