jQuery – Equal Column Height


Here is a simple plugin for jQuery that I wrote the other day. This makes all elements that match the selector get the same height. It may for example be useful to ensure that different columns get the same height. Here is the code and an example of how to use it:

	$.fn.fixColumnHeight = function(){
		var maxHeight = 0;
			maxHeight = Math.max(maxHeight, $(this).height());
$('#column1, #column2, #column3').fixColumnHeight();