Skip to content

Instantly share code, notes, and snippets.

@sunilw
Created August 15, 2016 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunilw/68ac45b2d35813afa3cb63d27fe181a8 to your computer and use it in GitHub Desktop.
Save sunilw/68ac45b2d35813afa3cb63d27fe181a8 to your computer and use it in GitHub Desktop.
$ = jQuery.noConflict() ;
/**
* equalize heights on the 'our people' page
*/
function equalizeHeights(targets ) {
console.debug( 'how many targets? ' + targets.length ) ;
var heights = [] ;
/*
* get the heights of all the elements
*/
targets.each(function() {
console.debug( heights.push($(this).height())) ;
}) ;
console.debug("heights: ") ;
console.debug(heights) ;
console.debug("biggest number: ") ;
var biggest = Math.max.apply(Math, heights) ;
console.debug(biggest) ;
/*
* make all of our targets the same heights as the largest element
*/
targets.each(function() {
$(this).height(biggest) ;
}) ;
} ;
$(document).ready(function() {
/**
* init
*/
(function(){
equalizeHeights( $("#roskill-community-voice-team .fl-callout-content") ) ;
})();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment