[英]Jquery fadeout speed won't apply
I have a problem with the jquery fadeout. 我的jQuery淡出问题。 I tried to set 3000 Milliseconds but it won't apply 我尝试设置3000毫秒,但不适用
I use: 我用:
$('#alertSuccess').fadeOut('3000', function() {
document.getElementById("alertSuccess").style.display = "none";
});
but it still disappears very very fast ( i guess the default 400milli seconds).. 但它仍然消失得非常快(我想默认是400毫秒)。
Anyone know why? 有人知道为什么吗?
Try using this code: 尝试使用以下代码:
html:
<div id="box1" class="box">linear</div>
Then use this script 然后使用这个脚本
$(document).ready(function() {
function complete() {
document.getElementById("alertSuccess").style.display = "none";
}
$("#box1").fadeOut(3000,complete);
});
you can check this code on http://jsfiddle.net/FLARH/ 您可以在http://jsfiddle.net/FLARH/上检查此代码
.fadeOut(3000, function() { ... }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.