JSFiddle - React, Tailwind, and code Playground
by Touqeer Shafi
HTML
<script src="https://code.jquery.com/jquery-3.2.1.js"></script>
<div class="row">
<div class="first-div" style="height:200px;background: #CCC;"></div>
<div class="first-div" style="height:300px;background: #333;"></div>
<div class="first-div" style="height:400px;background: #999;"></div>
</div>
CSS
.row > div { float:left; width: 200px; }
JavaScript
jQuery(document).ready(function($){
var $divs = $('.row > div');
var highest = [];
$.each($divs, function($index, $item) {
highest.push($($item).height());
//console.log($item);
})
function compareNumbers(a, b) {
return b - a;
}
//console.log();
highest = highest.sort(compareNumbers);
$('.row > div').height(highest[0])
})