Skip to content

Commit

Permalink
fix bug with $.height() in jQuery 1.8+ with double padding, fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbanks committed Sep 17, 2013
1 parent 289302f commit cbac493
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
@@ -1,6 +1,6 @@
# jQuery Simple Equal Heights

Version 1.5.0
Version 1.5.1

## Summary

Expand Down Expand Up @@ -50,6 +50,10 @@ See `example.html` in examples folder.

### Changelog

#### Version 1.5.1

* fix bug with $.height() in jQuery 1.8+ with double padding when `box-siding` is set to `border-box`

#### Version 1.5.0

* added Grunt for linting and minification
Expand Down
4 changes: 2 additions & 2 deletions jquery.equalheights.js
Expand Up @@ -6,7 +6,7 @@
* Uses the same license as jQuery, see:
* http://docs.jquery.com/License
*
* @version 1.5.0
* @version 1.5.1
*/
(function($) {

Expand All @@ -20,7 +20,7 @@
if ( height > maxHeight ) { maxHeight = height; }
});

return $this.height(maxHeight);
return $this.css('height', maxHeight);
};

// auto-initialize plugin
Expand Down
4 changes: 2 additions & 2 deletions jquery.equalheights.min.js
Expand Up @@ -6,6 +6,6 @@
* Uses the same license as jQuery, see:
* http://docs.jquery.com/License
*
* @version 1.5.0
* @version 1.5.1
*/
!function(a){a.fn.equalHeights=function(){var b=0,c=a(this);return c.each(function(){var c=a(this).innerHeight();c>b&&(b=c)}),c.height(b)},a("[data-equal]").each(function(){var b=a(this),c=b.data("equal");b.find(c).equalHeights()})}(jQuery);
!function(a){a.fn.equalHeights=function(){var b=0,c=a(this);return c.each(function(){var c=a(this).innerHeight();c>b&&(b=c)}),c.css("height",b)},a("[data-equal]").each(function(){var b=a(this),c=b.data("equal");b.find(c).equalHeights()})}(jQuery);

0 comments on commit cbac493

Please sign in to comment.