Js / Css Transition When Window Not Active
I created a small slider where I set classes with JS every X seconds and do the animation with CSS Transition. Now when the window is not active (for example you watch at another t
Solution 1:
The problem is that when the tab/window is hidden, browser doesn't redraw its content but the script continues to run, and when you switch back, it catches up at the first script execution that cause a redraw.
What you could do is use the Page Visibility API and stop script from running when tab/window is non visible
Post a Comment for "Js / Css Transition When Window Not Active"