Get parent height and assign to selector
I'm trying to find a way to go through each instance of.div with class="promo" in order to get the parents height and assign it so both are the same.
I tried the following but could not get it to work. I'm a bit confused on how to go thru each and pass the height value. There are 4 div's with the promo class and each parent is a different height depending on the content. I want to build this so that the promo div will automatically adjust and have the same height as its parent.
- $('.promo').each(function(){
- $(this).height() = $(this).parent().height();
- });