Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight a browser tab with color

Tags:

jquery

I have a chat web application and I need a feature wherein if a particular user has multiple tabs open in the browser window and if the chat tab isnt the active one, in case if he receives a ping from the other end, the chat tab should automatically highlight to grab the users attention.

I am planning to do this in jQuery. Any idea how this could be achieved. I know we could use the .focus and .blur method to catch the tab active/inactive status but how to make the tab blip with color when the browser is minimized.

like image 699
Sunny D'Souza Avatar asked Oct 24 '22 20:10

Sunny D'Souza


1 Answers

You can't change the actual browser functionality with jQuery because the web content is isolated, or sandboxed, from the actual browser for security reasons.

If you really want something that will work you'll have to make a browser addon, which would then need to be downloaded and enabled by the user.

Check out this related answer

like image 130
Mottie Avatar answered Oct 27 '22 10:10

Mottie