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