Detect the browser visitor is using with jQuery
In today’s daily tip we will make a little jQuery script to check and return the visitor’s browser.
if( $.browser.safari ) { alert('you are using safari or chrome'); }
if ($.browser.msie) { alert('you are using internet explorer, why are you doing that?
'); }
if ($.browser.mozilla) { alert('you are using mozilla firefox'); }
That’s it
Related posts:
- 10 Awesome jQuery and JavaScript Snippets
- Coding/Slicing Websites using Images vs. CSS3 & HTML5
- Simple Cross Browser CSS Layouts (ie6+, ff3+,safari*,chrome*)
- The CSS Pre Wrap Trick
Slobodan Kustrimovic
This author has yet to fill his BIO.
Did you absolutely LOVE this article... share it!
Comments
Leave your own!