---
title: "Getting Browser Version using JQuery"  
description: "In this article I have tried to explaining how to get browser version using JQuery."  
author: "Vijay Shukla"  
published: 2012-12-27  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/1094/getting-browser-version-using-jquery  
category: "jquery"  
tags: ["jquery"]  
reading_time: 2 minutes  

---

# Getting Browser Version using JQuery

In this [article](https://yourviews.mindstick.com/view/81489/kashmir-now-after-an-year-of-abrogation-of-article-370) I have tried to explaining how to get [browser](https://www.mindstick.com/articles/323165/top-10-fastest-internet-browsers-in-the-world) [version](https://www.mindstick.com/articles/12845/things-to-remember-while-migrating-odoo-to-a-better-version) using JQuery.\

JQuery provides a JQuery.browser [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin) which is used for get version of your browser, and we also need the JQuery.each() method and .appendTo() method for getting the browser version and show its version on HTML [application](https://www.mindstick.com/articles/12824/calculator-application-in-android), we can also say that is the JQuery utilities.

##### JQuery.browser :

The JQuery.browser property provides information about the [web browsers](https://answers.mindstick.com/qa/112310/how-do-i-implement-push-notifications-in-mobile-apps-and-web-browsers), it contains flags for four popular browsers classes ([Internet](https://yourviews.mindstick.com/view/81617/now-it-is-time-to-say-goodbye-to-internet-explorer) Explorer, Mozilla, Webkit, and Opera) [as well as](https://www.mindstick.com/forum/156547/difference-between-max-width-and-width-as-well-as-max-height-and-height) version information.

##### JQuery.each():

This method is used to loop through each element of the target jQuery object. It’s Very useful for multi elements DOM manipulation.

##### Syntax:

```
 $(selector).each(function(index, element))
```

##### .appendTo():

This method inserts [HTML elements](https://www.mindstick.com/forum/158688/how-can-you-dynamically-create-html-elements-using-jquery) at the last of the selected DOM elements.

##### Syntax:

```
$(content).appendTo(selector)
```

##### Style:

```
   <style>
   p { color:green; font-weight:bolder; margin:3px 0 0 10px; }
   div { color:blue; margin-left:20px; font-size:14px; }
   span { color:red; }
  </style>
```

Script:

```
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
   <script type="text/javascript" language="javascript">
 $(document).ready(function() {
    jQuery.each(jQuery.browser, function(i, val) {
      $("<div>" + i + " : <span>" + val + "</span>")
                .appendTo(document.body);
    });
   });
   </script>
   <style>
```

##### HTML Code:

```
  <p>Browser info:</p>
```

##### Output:

![Getting Browser Version using JQuery](https://www.mindstick.com/mindstickarticle/7b1136a2-6923-4449-bddb-6a0d7182174f/images/25733ee8-db28-44df-bd2a-e041b607f3c7.png)

---

Original Source: https://www.mindstick.com/articles/1094/getting-browser-version-using-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
