I need to get the height of a textarea. Seemingly so simple but it's driving me mad.

I have been researching for ages on stackoverflow with no luck: [textarea-value-height](https://stackoverflow.com/questions/5995809/textarea-value-height) and [jquery-js-get-the-scrollbar-height-of-an-textarea](https://stackoverflow.com/questions/5980150/jquery-js-get-the-scrollbar-height-of-an-textarea) and [javascript-how-to-get-the-height-of-text-inside-of-a-textarea](https://stackoverflow.com/questions/3341496/javascript-how-to-get-the-height-of-text-inside-of-a-textarea), among many others.

This is how it looks currently:

![picture of a dialog window with a textarea](https://i.stack.imgur.com/6Fm8A.png)

This is how I want it to look, open a full height:

![picture of a dialog window with a textarea open at full height](https://i.stack.imgur.com/52KS8.png).

Here is my html:

```
 <textarea id="history" class="input-xxlarge" placeholder="Enter the content ..." rows="13"></textarea>

```

CSS:

```
 .input-xxlarge {
    display: inline-block;
    height: auto;     
    font-size: 12px;
    width: 530px;
    resize: none;
    overflow: auto;
 }

```

jQuery:

```
 var textarea = $('#history');

```

I've tried (inter alia):

```
1. textarea.height() --> always returns 0
2. textarea.ready(function() { // wait for DOM to load
      textarea.height();
   }
3. getting scrollheight from textarea as an HTMLTextareaElement (i.e. DOM Element) --> returns 0
4. var contentSpan = textarea.wrapInner('<span>');
   var height = contentSpan.height(); --> always returns 0

```

Please help, I'm at my wit's end!