summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Banks <mjbanks@gmail.com>2012-05-05 17:48:08 -0400
committerMatt Banks <mjbanks@gmail.com>2012-05-05 17:48:08 -0400
commit06cbf92afb0ad0ce80533ca7372ec4cc2922afa1 (patch)
tree233dd81e794054615d296fc909eb5affe8db94be
parent2562f9c1b129d40d4681bdde6593e106471a49fd (diff)
downloadjQuery.equalHeights-06cbf92afb0ad0ce80533ca7372ec4cc2922afa1.zip
jQuery.equalHeights-06cbf92afb0ad0ce80533ca7372ec4cc2922afa1.tar.gz
jQuery.equalHeights-06cbf92afb0ad0ce80533ca7372ec4cc2922afa1.tar.bz2
cleaned up plugin function call
-rw-r--r--jquery.equalheights.js13
-rw-r--r--jquery.equalheights.min.js4
2 files changed, 9 insertions, 8 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);
};
diff --git a/jquery.equalheights.min.js b/jquery.equalheights.min.js
index 70d7c33..2e9e2cd 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.1
+ * @version 1.1
*/
-(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
+(function(a){a.fn.equalHeights=function(){var b=0;a(this).each(function(){var c=a(this).height();if(c>b){b=c}});a(this).height(b)}})(jQuery); \ No newline at end of file