/ Published in: jQuery
A basic plugin to equalize the heights of a collection of elements.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Usage: $( elements ).equalHeights(); (function($){ $.fn.equalHeights = function() { var max = 0; return this .each( function(){ max = Math.max( max, $(this).height() ); }) .css({ 'height': max }); }; })(this.jQuery);