Click here to Skip to main content
Click here to Skip to main content

Browser Type Checking By jQuery

, 8 May 2011
Rate this:
Please Sign up or sign in to vote.
By using $.browser variable, we can check browser type in jQuery.

$.browser

By using $.browser variable, we can check browser type in jQuery.
Download jquery-1.5.2.min.js.

HTML Block

<html>
<head>
<title>jQuery Utility</title>
<script src="jquery-1.5.2.min.js"></script>
<style type="text/css">
td {background-color:#ffffff;color:#000000;}
</style>
<script type="text/javascript">	
function fbrowsercheck(){$.each($.browser,function(i, val){$("<div>" + i + " is " + val +"</div>").appendTo("#td2");})}
</script>
</head>
<body>
<table cellpadding="3" cellspacing="3" border="0">
<tr><td>Browser type checking by using $.browser</td><td><input type="button" value="$.browser"  önclick="javascript:fbrowsercheck();" /></td><td id="td2"></td></tr>
</table>
</body>
</html>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

R S Dodiya
Software Developer (Senior)
India India

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 8 May 2011
Article Copyright 2011 by R S Dodiya
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid