开发者

if tab fadeIn, redirect

开发者 https://www.devze.com 2023-03-27 07:11 出处:网络
I have a tab: <div id=tab1> ... </div> And I want to do, if tab1 fadeIn, then redirect. How would I do it? I would imagine something likes this:

I have a tab:

<div id=tab1> ... </div>

And I want to do, if tab1 fadeIn, then redirect.

How would I do it? I would imagine something likes this:

if $('#ta开发者_如何学运维b1').fadeIn(function(){
        window.location = "http://google.com"
});


If what you mean is if the tab is hidden go somewhere then this syntax could work:

if ($("#tab1").is(":hidden")) {
 window.location = "http://www.google.com/";
}
0

精彩评论

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

关注公众号