下面的fadeIn,fadeOut效果在 Firefox 3.0 中工作正常,但在 IE 7 中不起作用……这是什么原因,有什么诀窍?这个想法当然是为了获得“眨眼”效果并将用户的注意力吸引到表格中的特定行。
function highLightErrorsAndWarnings() {
$(".status-error").fadeIn(100).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300);
$(".status-warning").fadeIn(100).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300);
}
更新:发现愚蠢的问题......“.status-error”指向一个tr元素。可以在 Firefox 的 tr 上设置背景颜色并将其淡化,但在 IE 中则不行。将“CSS 指针”更改为“.status-error td ”使其指向 tr 下方的 td,并且在所有浏览器中一切正常。