Posted By

thesmu on 08/09/13


Tagged

jquery height columns


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

adambundy


Use jQuery/CSS to find the tallest of all elements - Stack Overflow


 / Published in: jQuery
 

URL: http://stackoverflow.com/questions/6781031/use-jquery-css-to-find-the-tallest-of-all-elements

$(document).ready(function() { var maxHeight = -1;

$('.features').each(function() { maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height(); });

$('.features').each(function() { $(this).height(maxHeight); }); });

  1. $(document).ready(function() {
  2. var maxHeight = -1;
  3.  
  4. $('.features').each(function() {
  5. maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height();
  6. });
  7.  
  8. $('.features').each(function() {
  9. $(this).height(maxHeight);
  10. });
  11. });

Report this snippet  

You need to login to post a comment.