Equalize Heights of Divs


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var maxHeight = 0;
  2.  
  3. $("div").each(function(){
  4. if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
  5. });
  6.  
  7. $("div").height(maxHeight);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.