开发者

having a background image for a specific time only

i'm trying to make a div have a background image but only for a specific time: pseudo co开发者_StackOverflowde: div has background image, after 1 sec passed div has background none, anyway doing this in jquery? regards


You can try delay in jQuery 1.4+

$('#someDivID').delay(1000).css('background', 'none');

Otherwise you can use setTimeout:

setTimeout(function() { $('#someDivID').css('background', 'none'); }, 1000);


$("div.removebg")
    .delay(1000000) // miliseconds
    .animate{
    background: 'none'
}, 
100);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜