title: .height() is not a function javascript
body: <p>Here is my function that makes two div the same height:</p>
  
  <pre><code>$(document).ready(function() {
                           var subMenuArray=document.getElementsByClassName("submenu");
                           for(i=0;i&lt;subMenuArray.length;i++)
                           {
                               var leftPart=subMenuArray[i].getElementsByClassName("submenu_category_div");
                               var rightPart=subMenuArray[i].getElementsByClassName("hot_sale_product_div");
                               var leftHeight = leftPart[i].height();
                               var rightHeight = rightPart[i].height();
  
                              if (leftHeight &gt; rightHeight){
                                  rightPart[0].setAttribute('height', leftHeight );
                              }
                              else{
                                  leftPart[0].setAttribute('height', rightHeight);
                              }
                          };
  
  
  });
  </code></pre>
  
  <p>But it says that height is not a function in:</p>
  
  <pre><code>var leftHeight = leftPart[0].height();
  </code></pre>
  
  <p>Can anybody help me with this? Thanks.</p>