diff options
author | Matt Banks <mjbanks@gmail.com> | 2013-03-13 11:39:13 -0400 |
---|---|---|
committer | Matt Banks <mjbanks@gmail.com> | 2013-03-13 11:39:13 -0400 |
commit | cca79d3ef9f6580aaf0cec92cf218827a036274c (patch) | |
tree | 3175c54eccc100adccdf37baafbfcbbd2ba518ad | |
parent | 01fd250a3f64418bc89fc3aab5774bc60128bac8 (diff) | |
download | jQuery.equalHeights-cca79d3ef9f6580aaf0cec92cf218827a036274c.zip jQuery.equalHeights-cca79d3ef9f6580aaf0cec92cf218827a036274c.tar.gz jQuery.equalHeights-cca79d3ef9f6580aaf0cec92cf218827a036274c.tar.bz2 |
properly return jQuery object for chainingv1.3
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | example/example.html | 2 | ||||
-rw-r--r-- | jquery.equalheights.js | 4 | ||||
-rw-r--r-- | jquery.equalheights.min.js | 4 |
4 files changed, 10 insertions, 6 deletions
@@ -1,6 +1,6 @@ # jQuery Simple Equal Heights -Version 1.2 +Version 1.3 ## Summary @@ -32,6 +32,10 @@ See `example.html` in examples folder. ### Changelog +#### Version 1.3 + +* properly return the jQuery object to allow chaining + #### Version 1.2 * properly cache `$(this)` since it's called twice in the main function diff --git a/example/example.html b/example/example.html index f4d6f69..216137e 100644 --- a/example/example.html +++ b/example/example.html @@ -53,4 +53,4 @@ </script> </body> -</html>
\ No newline at end of file +</html> diff --git a/jquery.equalheights.js b/jquery.equalheights.js index 05b19dc..f21303c 100644 --- a/jquery.equalheights.js +++ b/jquery.equalheights.js @@ -6,7 +6,7 @@ * Uses the same license as jQuery, see: * http://docs.jquery.com/License * - * @version 1.2 + * @version 1.3 */ (function($) { @@ -20,7 +20,7 @@ if ( height > maxHeight ) { maxHeight = height; } }); - $this.height(maxHeight); + return $this.height(maxHeight); }; })(jQuery); diff --git a/jquery.equalheights.min.js b/jquery.equalheights.min.js index 5bbdcd0..f2bd89b 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.2 + * @version 1.3 */ -(function(a){a.fn.equalHeights=function(){var b=0,c=a(this);c.each(function(){var c=a(this).innerHeight();c>b&&(b=c)}),c.height(b)}})(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.height(b)}})(jQuery); |