Skip to content

Instantly share code, notes, and snippets.

@anthonydillon
Created June 17, 2014 09:12
Show Gist options
  • Save anthonydillon/3d2961f0b3c6ca768657 to your computer and use it in GitHub Desktop.
Save anthonydillon/3d2961f0b3c6ca768657 to your computer and use it in GitHub Desktop.
core.setEqualHeight = function() {
var maxHeight = 0;
var heightArray = Array();
var collection = Y.all('.equal-height');
collection.each(function(node) {
node.all(' > div, > ul li').each(function(node) {
if(node.get('clientHeight') > maxHeight){
maxHeight = node.get('clientHeight');
}
});
node.all('> div, > ul li').setStyle('height', maxHeight);
maxHeight = 0;
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment