Created
July 11, 2012 17:09
-
-
Save SkyronDevelopers/3091782 to your computer and use it in GitHub Desktop.
js: equalheight_plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @title: Equal Height | |
* @version:2.0 | |
* @author: Andreas Lagerkvist | |
* @date: 2008-09-16 | |
* @url: http://andreaslagerkvist.com/jquery/equal-height/ | |
* @license: http://creativecommons.org/licenses/by/3.0/ | |
* @copyright: 2008 Andreas Lagerkvist (andreaslagerkvist.com) | |
**/ | |
jQuery.fn.equalHeight=function(){var height=0;var maxHeight=0;this.each(function(){height=jQuery(this).outerHeight();maxHeight=(height>maxHeight)?height:maxHeight});return this.each(function(){var t=jQuery(this);var minHeight=maxHeight-(t.outerHeight()-t.height());var property=jQuery.browser.msie&&jQuery.browser.version<7?'height':'min-height';t.css(property,minHeight+'px')})}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment