title: Get height of a parent div
body: <pre><code>  &lt;div class='contain'&gt;
       &lt;a href="#"&gt;
          &lt;div id="s1" class="sub" onclick="hello('1')"&gt;dasdad&lt;/div&gt;
       &lt;/a&gt;
    &lt;/div&gt;
   &lt;div class='contain'&gt;
       &lt;a href="#"&gt;
          &lt;div id="s2" class="sub" onclick="hello('2')"&gt;dasdad&lt;/div&gt;
       &lt;/a&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>From the above how can I get the height of the parent contain div when div sub is clicked in jquery.</p>
  
  <p>Tried using <code>$('#s1').parent().height();</code>. </p>
  
  <h2>CSS</h2>
  
  <pre><code>   .contain{margin:auto;width:auto; height:auto;}
     .sub{width:160px;min-height: 173px;}
  </code></pre>