How can I call a JavaScript function when a div’s display is set to none?
This is the code I have :
if(document.getElementById("myDiv").style.display == "none"){
myFunction();
}
I was thinking having a function that repeats everytime (similar to an actionscript ENTER_FRAME event) with the if statement within it but i imagine that would ass a lot of lag.
Sorry if Im not clear enough.
I can think of 2 options.
Or