這是我的代碼。挑選所有元素的最大高度
v=dom.find("ul:first").outerHeight(); // the height of the first li element
// instead of taking the height of the first li element, it should loop through all
// li elements and set v to the element with the biggest height
在代碼中間的註釋幾乎解釋了一切。我需要遍歷所有李元素,並採取最大的高度,而不是採取第一個元素的高度。
謝謝。它效果很好。 – Peter 2010-10-24 15:44:05
不錯的答案,代碼是相當乾淨的條件運算符 – kobe 2010-10-24 16:49:22
有人可以請詳細說明條件運算符部分?它很乾淨,但我還不明白。 – MauF 2012-12-04 16:49:04