diff options
author | Matt Banks <mjbanks@gmail.com> | 2012-05-05 17:48:08 -0400 |
---|---|---|
committer | Matt Banks <mjbanks@gmail.com> | 2012-05-05 17:48:08 -0400 |
commit | 06cbf92afb0ad0ce80533ca7372ec4cc2922afa1 (patch) | |
tree | 233dd81e794054615d296fc909eb5affe8db94be /jquery.equalheights.js | |
parent | 2562f9c1b129d40d4681bdde6593e106471a49fd (diff) | |
download | jQuery.equalHeights-06cbf92afb0ad0ce80533ca7372ec4cc2922afa1.zip jQuery.equalHeights-06cbf92afb0ad0ce80533ca7372ec4cc2922afa1.tar.gz jQuery.equalHeights-06cbf92afb0ad0ce80533ca7372ec4cc2922afa1.tar.bz2 |
cleaned up plugin function call
Diffstat (limited to 'jquery.equalheights.js')
-rw-r--r-- | jquery.equalheights.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/jquery.equalheights.js b/jquery.equalheights.js index 68a2a3e..5fdd692 100644 --- a/jquery.equalheights.js +++ b/jquery.equalheights.js @@ -6,18 +6,19 @@ * Uses the same license as jQuery, see: * http://docs.jquery.com/License * - * @version 1.0 + * @version 1.1 */ (function($) { $.fn.equalHeights = function() { var maxHeight = 0; - $(this).each(function(index){ - var height = $(this).height(); - if (maxHeight < height) { - maxHeight = height; - } + + $(this).each( function() { + var height = $(this).height(); + + if ( height > maxHeight ) { maxHeight = height; } }); + $(this).height(maxHeight); }; |