Answer the question
In order to leave comments, you need to log in
How to align blocks by height in js?
https ://monosnap.com/file/yVK2NC77Y14EUYoRcEgo6Jk0... the height of the blocks was equal to the height of the longest
Answer the question
In order to leave comments, you need to log in
This question comes up all the time.
var maxHeight = Math.max.apply(
null,
$.map($("div"), function(e){
return $(e).height();
})
);
$("div").height(maxHeight);
on jquery - iterate over all blocks in a row with each, select the maximum height(), apply to all blocks in a row with css('height'). repeat for each line.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question