title: Why jquery height and javascript height returns 0?
body: <p>I have a visible div on screen, but when I gets its height, it always returns 0. How it is possible? I have tried many jquery and javascript methods to get hight but it returns 0. This is my div:</p>
  
  <pre><code>&lt;div class="option-content"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-sm-12"&gt;
              &lt;div class="dropDownStyling" id="filterDropdowns"&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;!-- Other contents --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have tried following methods to get height:</p>
  
  <pre><code>var $element = $("#filterDropdowns");
  $element.css("height")
  $element.height()
  $element.innerHeight()
  $element.outerHeight()
  </code></pre>
  
  <p>Also I tried javascript:</p>
  
  <pre><code> document.getElementById('filterDropdowns').offsetHeight
   document.getElementById('filterDropdowns').clientHeight
  </code></pre>
  
  <p>But in all cases, it returns 0 while it returns the width value. Then why height value gets 0?</p>