[英]Problem with jQuery.slideUp
我对Jquery有问题,它可以工作,但完成后似乎会闪烁:
此处示例:
http://www.zombiewrath.com/maintest.php
为什么这样做呢?
这是代码:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
</head>
<body>
<input type="button" onclick="test()">
<div id="tablemin">
<table bordercolor="#0000FF" width="670" border="1">
<tr>
<td class="style5" width="400" valign="top" style="width: 300px"><b><u>Personal Feed: </u></b><br>
</td>
<td class="style5" width="355" valign="top"><u><strong>Live Feed:</strong> </u><br>
<div id="ReloadTime3" style="width: 350px">
</div></td>
</tr>
<tr>
<td class="style5" valign="top" colspan="3" style="width: 488px"><b><u>Local news for Zone B-4...</u></b></td></tr>
</table>
<p> </p>
</div>
<script type="text/javascript">
$(document.body).click(function () {
$('#tablemin').slideUp('slow');
});
</script>
</body></html>
*请注意,我使用的是IE 7,如果幻灯片结尾没有闪烁,请说:)-然后发布哪个浏览器...
为什么在IE 7中会闪烁?
谢谢。
有趣的是,最近也有同样的问题。 IE6中也会发生这种情况,其他所有浏览器均会正确处理。
这不是一个真正的解决方案,但可能可以使用动画来代替?
$('#tablemin').animate({height: '0px'},1000);
确保您有溢出:隐藏在tablemin上。
由于此行引起的javascript错误而闪烁
<input type="button" onclick="test()">
我没有看到test()函数
这对我有用 : 如何解决在jQuery中使用slideToggle时出现的闪烁?
显然,您需要提供DOCTYPE。 :-/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.