I have an image slider that slides automatically. Because I’m nice, I want to ensure that it doesn’t continue to slide when the user has a different window/tab focused.
What events fire when leaving a tab/window, and which fire when returning?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When leaving:
blur; when entering:focus. Additionally, the following can happen:clickwhen the user clicks on the window to get focus;mouseoverwhen the user moves over the window;mousedown/mouseup(related to clicking);keyup/keydownwhen pressing a key (e.g. ctrltab).