admin管理员组文章数量:1194115
Looking to make a div fadeout after 10 seconds.
Tried various things but can't get the timer working.
This is the code:
$('#deletesuccess').show();
Edit:
This is the full code:
function refreshTable() {
//timestamp to get around ie caching issue
var tsTimeStamp= new Date().getTime();
$('#deletesuccess').show().fadeOut();
$.get('table.php',
{action: "get", time: tsTimeStamp},
function(data){
$('#customertable').html(data).fadeIn();
});
return true;
}
I need to show the div and then hide it after x amount of seconds.
Looking to make a div fadeout after 10 seconds.
Tried various things but can't get the timer working.
This is the code:
$('#deletesuccess').show();
Edit:
This is the full code:
function refreshTable() {
//timestamp to get around ie caching issue
var tsTimeStamp= new Date().getTime();
$('#deletesuccess').show().fadeOut();
$.get('table.php',
{action: "get", time: tsTimeStamp},
function(data){
$('#customertable').html(data).fadeIn();
});
return true;
}
I need to show the div and then hide it after x amount of seconds.
Share Improve this question edited Mar 23, 2010 at 6:00 rahul 187k50 gold badges238 silver badges264 bronze badges asked Mar 11, 2010 at 13:12 user289554user2895542 Answers
Reset to default 15An easy way in 1.4:
$('#deletesuccess').delay(10000).fadeOut();
You can also abort this easily if needed:
$('#deletesuccess').stop(true, true);
Use setTimeout for this.
setTimeout(function(){
$("#deletesuccess").fadeOut("slow");
}, 10000 );
本文标签: javascriptJquery making div fadeout with timerStack Overflow
版权声明:本文标题:javascript - Jquery making div fadeout with timer - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738498142a2090105.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论