Why is my jQuery code doesn't work :     <textarea>This is very, very long preloading text, I mean vvveeerrryyy, vvveeerrryyy long one!</textarea>
    
    $(function () {
    $('textarea').setAttribute('style', 'height:' + ($('textarea').scrollHeight) + 'px;');
    });

What am I doing wrong, please? I double checked it, but can't find anything wrong