As walk around the block?

there is a wrapper

in this data__item (3 pieces)

and data__image
and data__content

as I walk
to get the max height data__content
and set all the data__content height

(ie min-height: 400px
for example)
April 4th 20 at 13:11
4 answers
April 4th 20 at 13:13
$(document).ready(function() {
 var maxHeight = 0;
 $(".wrapper .data__content").each(function() {
 if ($(this).outerHeight() > maxHeight) {
 maxHeight = $(this).outerHeight();
 }).css("min-height", maxHeight + "px");
April 4th 20 at 13:15
April 4th 20 at 13:17
I also practice in the solution of the problem and offer its function, with a detailed description:
dataContentHeight function() {
 // Select all desired items
 allelements are const = document.getElementsByClassName('data__content');

 // Set the height to zero
 let height = 0;

 // Check the array and looking for the highest altitude
 for(let i = 0; i < allelements are.length; i++) {
 if(height < allelements are[i].clientHeight) {
 height = allelements are[i].clientHeight;

 // All these elements in place the highest value on height
 for(let i = 0; i < allelements are.length; i++) {
 allelements are[i].style.height = height + 'px';

But actually, I think that I have some idea what the layout is and the same can be easily solved using the grid / flexbox.
April 4th 20 at 13:19
Eqheight and the like. From the task it is unclear what exactly you need. But likely with the Flex/grids, it can be solved without scripting

Find more questions by tags JavaScriptjQuery