title: Non-jQuery: Getting height even if the max-height is zero
body: <p>This code is working fine.</p>
  
  <p>What I am doing here is exaggerating the max-height of class active but what I need is to specify the exact height to be able to run the effect at the same speed.</p>
  
  <p>For this example. I don't write a dynamic navbar and this is lack of condition but I think it covers what I want to specify.</p>
  
  <p>If you click the w33racle, you'll see in console that there's a number. However, 0 is not the value I needed. I want it to be the height of ul.dropdown.active regardless of whether or not it has the .active class</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let test_clicker = document.getElementById('testClicker');
  
  test_clicker.onclick = (e) =&gt; {
    let self = e.target || e.srcElement,
        s_s = self.nextElementSibling.classList;
    
    s_s.contains('active') ? s_s.remove('active') : s_s.add('active');
    
    console.log(self.nextElementSibling.clientHeight);
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.dropdown {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out; }
  
  .dropdown.active {
    max-height: 500px; }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;
    &lt;li&gt;
      &lt;a id="testClicker"&gt;w33racle&lt;/a&gt;
      &lt;ul class="dropdown"&gt;
        &lt;li&gt;&lt;a&gt;This&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a&gt;is&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a&gt;for&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a&gt;sample&lt;/a&gt;&lt;li&gt;
        &lt;li&gt;&lt;a&gt;only&lt;/a&gt;&lt;li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help would be appreciated. Thanks</p>