开发者

How can I determine whether page (in Opera panel) is visible to user?

开发者 https://www.devze.com 2023-03-22 21:49 出处:网络
I try to create a page that will 开发者_高级运维show in a sidebar panel in Opera. I\'d like to know when user sees it or not. The problem is when a user closes the panel the page is still active - all

I try to create a page that will 开发者_高级运维show in a sidebar panel in Opera. I'd like to know when user sees it or not. The problem is when a user closes the panel the page is still active - all javascript functions run - I need to stop them when user closes the panel.


You can not realy detect that. Test the window size when the panel is closed. To detect active tab in browsers you can use mousemove or mouseover events. but it dose not work when the mouse is out of your window.

0

精彩评论

暂无评论...
验证码 换一张
取 消