Answer the question
In order to leave comments, you need to log in
How to execute a function in js while the layer is visible?
There is a code:
if ($('#aa_plugins_tabmsgBox').is(':visible') == true) {
if( $('#navbar').offset().top < 0 ) {
headfix();
}
}
Answer the question
In order to leave comments, you need to log in
First $('#aa_plugins_tabmsgBox').is(':visible') returns either true or false, why compare it again? Secondly, you have some kind of script that makes it visible / invisible, hang a trigger there and subscribe to it where necessary in order to respond to a state change.
synchronously:
var aptB = $('#aa_plugins_tabmsgBox');
while(aptB.is(':visible')){
//do
}
var aptB = $('#aa_plugins_tabmsgBox');
setInterval(function(){
if(aptB.is(':visible')) //do
}, 1);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question