summaryrefslogtreecommitdiffstats
path: root/jquery.equalheights.js
diff options
context:
space:
mode:
authorMatt Banks <mjbanks@gmail.com>2013-03-07 08:51:01 -0500
committerMatt Banks <mjbanks@gmail.com>2013-03-07 08:51:01 -0500
commit01fd250a3f64418bc89fc3aab5774bc60128bac8 (patch)
tree8971abe9ddb3706670ed2ecb041d7f153342cfef /jquery.equalheights.js
parent5dccc25b37ac41e3830f9bd5e6c1489850133411 (diff)
downloadjQuery.equalHeights-01fd250a3f64418bc89fc3aab5774bc60128bac8.zip
jQuery.equalHeights-01fd250a3f64418bc89fc3aab5774bc60128bac8.tar.gz
jQuery.equalHeights-01fd250a3f64418bc89fc3aab5774bc60128bac8.tar.bz2
calculate height with innerHeight to include paddingv1.2
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 5fdd692..05b19dc 100644
--- a/jquery.equalheights.js
+++ b/jquery.equalheights.js
@@ -6,20 +6,21 @@
* Uses the same license as jQuery, see:
* http://docs.jquery.com/License
*
- * @version 1.1
+ * @version 1.2
*/
(function($) {
$.fn.equalHeights = function() {
- var maxHeight = 0;
+ var maxHeight = 0,
+ $this = $(this);
- $(this).each( function() {
- var height = $(this).height();
+ $this.each( function() {
+ var height = $(this).innerHeight();
if ( height > maxHeight ) { maxHeight = height; }
});
- $(this).height(maxHeight);
+ $this.height(maxHeight);
};
-})(jQuery); \ No newline at end of file
+})(jQuery);