Created
August 15, 2016 11:14
-
-
Save sunilw/68ac45b2d35813afa3cb63d27fe181a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ = 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