我发现这个片段给了我一个对象的最大高度,它在除ie8以外的所有内容中都很好用。有什么我可以改变,这将使其正常工作?这个JS为什么不在ie8中工作?
function thisHeight(){
return $(this).height();
}
$("#new-deals ul.centerSpace").height(function() {
var dealNameHeight = Math.max.apply(Math, $(this).find(".deal-name").map(thisHeight));
$(".deal-name").css({height: dealNameHeight});
});
什么不行?你有任何错误? – ComFreek