Posted By

typomatic on 02/04/11


Tagged

equalheights


Versions (?)

Basic Equalize Heights Plugin


 / Published in: jQuery
 

A basic plugin to equalize the heights of a collection of elements.

  1. // Usage: $( elements ).equalHeights();
  2. (function($){
  3. $.fn.equalHeights = function() {
  4. var max = 0;
  5. return this
  6. .each(
  7. function(){
  8. max = Math.max( max, $(this).height() );
  9. })
  10. .css({
  11. 'height': max
  12. });
  13. };
  14. })(this.jQuery);

Report this snippet  

You need to login to post a comment.