if tab fadeIn, redirect
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/";
}
精彩评论