开发者

Fades out upon close, jQuery

I have a problem on this code

$(document).ready(function(){
    $('.nm_close').click(function(){
        $('.map_pops').css('display','none');
    });
});

What I want is thi开发者_JAVA百科s bubble popup will fades out when it closes. Thank you!


Have you tried fadeOut(250);?

so, $('.map_pops').fadeOut(250);

btw: 250 is the milliseconds it should take to fade out. So 5000 would be 5 seconds(ish).


You'll want to use the fadeOut() function (see: http://api.jquery.com/fadeOut/).

$(document).ready(function(){
    $('.nm_close').click(function(){
        $('.map_pops').fadeOut(<duration>);
    });
});

is the length of time you want it to fade out over be it slow, fast etc. Its all in the documentation of fadeOut()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜