JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" value="equalize div heights">
<div style="background:red; height: 40px; "></div>
<div style="background:green; height: 70px;"></div>
<div style="background:blue; height: 50px; "></div>
CSS
div { width: 40px; float:left; }
input { clear:left}
JavaScript
$.fn.equalizeHeights = function() {
var two = $(this).map(function(i, e) {
return $(e).height();
});
console.log(two);
console.log(two.constructor);
console.log(two.get());
console.log(two.get().constructor);
return this.height(Math.max.apply(this,two.get()));
}
$('input').click(function() {
$('div').equalizeHeights();
});