I’ve seen other posts on how to just mimic the title flash like Facebook does, but that’s easy I can do that (you know, when it alternates at the top between the normal page title and “New Message from Bob”), but I want to know how to make it work the same way where as that only shows up when your not viewing the current page. So basically I want to call this title flashing function when I call my instant message function only when you are not viewing the page, and then stop the alternation when you go back to the page, setting the page title back to it’s default. Anyone know how this kind of setup could be done? Thanks in advance to whoever can help!
Share
Let us call the function that waits for an event (say receiving a new message), and dynamically changes the page’s title based on that
foo. You have to attachfooto the event only when the user has tabbed away from the page, right? So use something like:And
unbindit when the window is tabbed to: