Equalize column heights


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

There isn't really anything here that others haven't already accomplished in plugin form. I needed something simple that could be easily stored, retrieved, and reused.


Copy this code and paste it in your HTML
  1. // Equalize column heights
  2. var max = 0;
  3. $('#list, #of, #elements').each(
  4. function(){
  5. max = Math.max( max, $(this).height() );
  6. })
  7. .css({
  8. 'height': max
  9. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.