root / htmltest / sites / all / themes / mayo / js / mayo-columns.js @ 5fc58a68
1 |
/**
|
---|---|
2 |
* @file
|
3 |
* Equolize the column height in a specified group
|
4 |
*/
|
5 |
jQuery(document).ready(function() {
|
6 |
mayoEqualHeight(jQuery("#top-columns .column-block"));
|
7 |
mayoEqualHeight(jQuery("#bottom-columns .column-block"));
|
8 |
}); |
9 |
|
10 |
function mayoEqualHeight(group) { |
11 |
var tallest = 0; |
12 |
group.each(function() {
|
13 |
var thisHeight = jQuery(this).height(); |
14 |
if (thisHeight > tallest) {
|
15 |
tallest = thisHeight; |
16 |
} |
17 |
}); |
18 |
group.height(tallest); |
19 |
} |