Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple JavaScript / jQuery code to set equal heights to elements. Original snippet from Paul Irish
/* equal heights */
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
$(window).load(function() {
$('#elementID, .elementClass').setAllToMaxHeight();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.