Learn jQuery

jQuery.browser

jQuery.browser property provides information about the web browser. jQuery.browser property works fine for IE, mozilla,Safari and opera browser but it does not work for Google Chrome.

jQuery.browser was removed in jQuery 1.9 and is available only through the jQuery.migrate plugin.

Example

Detect Browsers using jQuery

HTML
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"> </script>
<title>jQuery.browser Example </title>
</head>
</html>
Javascript
$(document).ready(function(){
if ($.browser.mozilla){
     alert('Mozilla');
    }
if ($.browser.safari){
     alert('Safari');
    }
if ($.browser.opera){
     alert('Opera');
    } 
if ($.browser.msie){
     alert('IE');
    }
});