Skip to content

Instantly share code, notes, and snippets.

@KaiserEMP
Created July 3, 2019 11:53
Show Gist options
  • Save KaiserEMP/9c847d9b9fc66df1e1d3b8167ff2ef9f to your computer and use it in GitHub Desktop.
Save KaiserEMP/9c847d9b9fc66df1e1d3b8167ff2ef9f to your computer and use it in GitHub Desktop.
var maxHeight = -1;
boxes.each(function (){
//(question)?(result if true):(result is false)
//maxHeight = maxHeight > $(this).outerHeight() ? maxHeight : $(this).outerHeight(); //shorthand
if (maxHeight > $(this).outerHeight() ) {
maxHeight = maxHeight
console.log('isit')
} else {
maxHeight = $(this).outerHeight();
console.log('isit22222')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment