开发者

jQuery - check if a element is hidden after a certain number of seconds

How can I chec开发者_开发问答k if a DIV is hidden or visible after a certain amount of seconds?


Use setTimeout. It will run a function after some amount of milliseconds (so do seconds * 1000):

setTimeout(function() {
    if($("div").is(":visible")) {
        // visible
    } else {
        // not visible
    }
}, amount_of_seconds * 1000);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜