title: jQuery - get height of content in absolute div
body: <p>There are similar questions but none answers helped.</p>
  
  <p>I have an absolute div with some content, and I want to get the "real" height of this div (not the height of visible part). I suppose it is a sum of heights of all children of this div.</p>
  
  <p><a href="https://jsfiddle.net/h7mamr4s/" rel="nofollow noreferrer">https://jsfiddle.net/h7mamr4s/</a> - as you can see <code>height()</code>, <code>outerHeight()</code> and <code>innerHeight()</code> methods return only the height of visible div. The "real" height should be greater.</p>
  
  <p>Is there a way to do so with pure JavaScript or jQuery? I use jQuery 1.11.2 (no, I can't update for some reasons).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>console.log("height(): " + $("#content").height());
  console.log("outerHeight(): " + $("#content").outerHeight());
  console.log("innerHeight(): " + $("#content").innerHeight());</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#content {
    border: 1px solid #000;
    margin-top: 35px;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    overflow: auto;
    width: 100%;
    z-index: 1;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://code.jquery.com/jquery-1.11.2.js"&gt;&lt;/script&gt;
  
  &lt;div id="content"&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
    &lt;span&gt;smth&lt;/span&gt;&lt;br /&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>