[jQuery] Get heights of multiple divs
Hoepfully a quick question. I'm trying to loop through and grab the
heights of multiple divs but I'm having a few problems. The height()
and css('height') functions dont seem to be working.
Each of the boxes are different heights and I want to use JS to get
the heighest box and set all the boxes to the same height.
HTML:
<div class='box'>content...</div>
<div class='box'>content...</div>
<div class='box'>content...</div>
JS:
$('.box').each(function(){
console.log( this.height() ); // throws "this.height is not a
function"
});
// this works for one box
$('box').height();
Any ideas?
Regards,
James