1
我寫了一個jQuery代碼,當我在IE 7中測試頁面時,發現這個錯誤無法獲取顯示屬性。無效的參數
無法獲得顯示屬性。無效的論點。
我的代碼:
var $insert = $(item).css({ height: 0, display:'' }).prependTo($list);
$insert.animate({ height: 35 }, 600).animate({ display: '' }, 600);
if ($list.children().length > 8) {
$list.find('> li:last').animate({ filter: alpha(opacity = 50) }, 600).remove();
}
當您通過DOM將'display'設置爲''''時,它被視爲沒有爲該屬性設置的內聯樣式值,它會有效地重置爲默認值或CSS計算值。不知道它將如何在jQuery動畫中工作,但它肯定會在那裏造成問題。 – 2011-03-09 19:21:01