Last active
August 29, 2015 14:03
-
-
Save KB1RMA/dfa3f766bacfe3607115 to your computer and use it in GitHub Desktop.
jQuery plugin to quickly set multiple divs to the same height. There's credit to be given to the original, but I can't remember where it came from.
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
// Usage: | |
// $('.unevenheights').setAllToMaxHeight(); | |
;(function ($) { | |
'use strict'; | |
$.fn.setAllToMaxHeight = function () { | |
return this.height(Math.max.apply(this, $.map( this , function (e) { return $(e).height() }) ) ); | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment