Projet

Général

Profil

Paste
Télécharger (449 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / mayo / js / mayo-columns.js @ d7f58da2

1
/**
2
 * @file
3
 * Equalize 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
}