Help With column heights

Help With column heights

I'm new to jQuery.

What I'm trying to do is check the heights of two columns and apply the greater height to the content wrapper the are in. 

Here;s what I have so far.

  1. $(document).ready(function () {
  2. var rColumnHeight = $('#right_column').css('height');
  3. var lColumnHeight = $('#left_column').css('height');
  4.       if (lColumnHeight > rColumnHeight) {
  5. $('#body_content').css('height', lColumnHeight)
  6.       }else if(rColumnHeight > lColumnHeight ){
  7.       $('#body_content').css('height', rColumnHeight)
  8. }
  9. });
This seems to work, but now I'm having trouble having the left column height be equal to the right column, and vis versa. That way, both heights are equal and the content wrapper's height matches that.

Any help would be appreciated.