summaryrefslogtreecommitdiffstats
path: root/jquery.equalheights.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.equalheights.js')
-rw-r--r--jquery.equalheights.js13
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);
};