0
How do i fix setInterval and setTimeout lag?
I am working on website containing some setIntervals and setTimeouts to slowly the CSS of some elements. But when I switch up tabs the browser (stops the functioning of them for the time i return back to the tab containing website) causes a lag in their functions which seems to completely mess up the look of my webpage. Is there anyway I can fix it? Or will I have start from scratch again?
2 odpowiedzi
0
I suggest that you use CSS transitions or animations instead.
0
I have tried using them but the result was better with setInterval and setTimeout. But if there is no way to fix it then I think I will have to use CSS instead 🤔.
Thanx btw.