php-mpos/public/site_assets/test/js/jquery.equalHeight.js
Sebastian Grewe cecbcb7d4b Adding testing theme for #444
This is just a WiP to test a new website template. Taken online from
source referenced in the sidebar footer.

Very nice and clean look, have not had the time to add all features yet
and is only used to demonstrate it.
2013-08-26 20:07:54 +02:00

20 lines
655 B
JavaScript

// make sure the $ is pointing to JQuery and not some other library
(function($){
// add a new method to JQuery
$.fn.equalHeight = function() {
// find the tallest height in the collection
// that was passed in (.column)
tallest = 0;
this.each(function(){
thisHeight = $(this).height();
if( thisHeight > tallest)
tallest = thisHeight;
});
// set each items height to use the tallest value found
this.each(function(){
$(this).height(tallest);
});
}
})(jQuery);