How to see the browser information using jQuery

Poster
Posted by Poster under jQuery category on | Views : 3893
To see the browser information using jQuery, write following code.

<script type="text/javascript">
jQuery.each(jQuery.browser, function(i, val) {
$("<div>" + i + " : <span>" + val + "</span>")
.appendTo(document.body);
});
</script>


If you run above code in Google Chrome, it will give following result (Surprisingly, it says safari: true :) )

version : 530.5
safari : true
opera : false
msie : false
mozilla : false

Comments or Responses

Login to post response