开发者

having a background image for a specific time only

开发者 https://www.devze.com 2023-01-05 23:04 出处:网络
i\'m trying to make a div have a background image but only for a specific time: pseudo co开发者_StackOverflowde:

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

精彩评论

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