KaiserEMP
7/3/2019 - 11:53 AM

shortHand If Else

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')
  }
}