为什么我不能使用jQuery在IE中淡出这个表行? [英] Why can't I fade out this table row in IE using jQuery?
本文介绍了为什么我不能使用jQuery在IE中淡出这个表行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法让IE中的表格淡出淡出。它适用于Chrome,但不适用于IE。它变得非常轻盈并停留在屏幕上。我尝试使用和不使用兼容模式的IE8。
I can't get the table row to fade out in IE. It works in Chrome, but not IE. It just becomes really 'light' and stays on the screen. I tried IE8 with and without compatibility mode.
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function hideIt()
{
$('#hideme').fadeTo("slow", 0.0);
}
</script>
</head>
<body>
<table>
<tr id='hideme'>
<td>Hide me!</td>
</tr>
</table>
<button onclick='hideIt();'>Hide</button>
</body>
</html>
是否有针对平滑淡入淡出的变通方法/解决方案?
Is there a workaround/solution for a smooth fade?
推荐答案
是的,这是IE中的一个错误(功能?)。如果将它应用于td元素而不是tr,您将获得所需的效果。所以,
Yeah, that's a bug (feature?) in IE. If you apply it to the td elements instead of the tr, you'll get the desired effect. So,
$('#hideme>td').fadeTo("slow", 0.0);
这篇关于为什么我不能使用jQuery在IE中淡出这个表行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文