diff options
-rw-r--r-- | jquery.equalheights.min.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jquery.equalheights.min.js b/jquery.equalheights.min.js index f2bd89b..660349e 100644 --- a/jquery.equalheights.min.js +++ b/jquery.equalheights.min.js @@ -8,4 +8,4 @@ * * @version 1.3 */ -(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)}})(jQuery); +(function($){$.fn.equalHeights=function(){var maxHeight=0,$this=$(this);$this.each(function(){var height=$(this).innerHeight();if(height>maxHeight){maxHeight=height}});return $this.height(maxHeight)};var target=$('[data-heights="equal"]').attr('data-targets'),init='[data-heights="equal"] '+target;$(init).equalHeights()})(jQuery); |