diff options
author | Matt Banks <mjbanks@gmail.com> | 2012-04-19 16:43:42 -0400 |
---|---|---|
committer | Matt Banks <mjbanks@gmail.com> | 2012-04-19 16:43:42 -0400 |
commit | 2562f9c1b129d40d4681bdde6593e106471a49fd (patch) | |
tree | 794edb3534cfead209c1d11a13ce679580c479a2 | |
parent | 5e5968903924baa823e370542580d243ee39b1a8 (diff) | |
download | jQuery.equalHeights-2562f9c1b129d40d4681bdde6593e106471a49fd.zip jQuery.equalHeights-2562f9c1b129d40d4681bdde6593e106471a49fd.tar.gz jQuery.equalHeights-2562f9c1b129d40d4681bdde6593e106471a49fd.tar.bz2 |
clean up code
-rw-r--r-- | jquery.equalheights.js | 24 | ||||
-rw-r--r-- | jquery.equalheights.min.js | 4 |
2 files changed, 16 insertions, 12 deletions
diff --git a/jquery.equalheights.js b/jquery.equalheights.js index 3764e0d..68a2a3e 100644 --- a/jquery.equalheights.js +++ b/jquery.equalheights.js @@ -8,13 +8,17 @@ * * @version 1.0 */ -$.fn.equalHeights = function() { - var maxHeight = 0; - $(this).each(function(index){ - var height = $(this).height(); - if (maxHeight < height) { - maxHeight = height; - } - }); - $(this).height(maxHeight); -};
\ No newline at end of file +(function($) { + + $.fn.equalHeights = function() { + var maxHeight = 0; + $(this).each(function(index){ + var height = $(this).height(); + if (maxHeight < height) { + maxHeight = height; + } + }); + $(this).height(maxHeight); + }; + +})(jQuery);
\ No newline at end of file diff --git a/jquery.equalheights.min.js b/jquery.equalheights.min.js index e95174b..70d7c33 100644 --- a/jquery.equalheights.min.js +++ b/jquery.equalheights.min.js @@ -6,6 +6,6 @@ * Uses the same license as jQuery, see: * http://docs.jquery.com/License * - * @version 1.0 + * @version 1.0.1 */ -$.fn.equalHeights=function(){var a=0;$(this).each(function(c){var b=$(this).height();if(a<b){a=b}});$(this).height(a)};
\ No newline at end of file +(function(a){a.fn.equalHeights=function(){var b=0;a(this).each(function(d){var c=a(this).height();if(b<c){b=c}});a(this).height(b)}})(jQuery);
\ No newline at end of file |