24 ways to impress your friends

Jump to menu

Vote up?

If you’re using jQuery in your pages, you can use the “.browser” method of the jQuery object:

if ($.browser.safari) { /* … */ }
if ($.browser.opera) { /* … */ }

That’s it!