Identify or Find Jquery Version

It may be useful to identify the version of jQuery library being used on a page. It is sometimes required to check the currently using jQuery version so that if needed then you can write version specific code. In this short post, you will find that there are some ways by which you can find the jQuery version.

For example, I am using jQuery 1.7.2 version

<script type="text/javascript"src="Script/jquery-1.7.2.js"></script>

Method 1:

$(document).ready(function()
{
   alert($().jquery);
});

It will display 1.7.2 in alert.

Method 2:

$(document).ready(function()
{
   alert(jQuery.fn.jquery);
});

Method 3:

$(document).ready(function()
{
   alert(jQuery()['jquery']);
});

Method 4:

$(document).ready(function()
{
   alert(jQuery.fn['jquery']);
});

Method 5:

$(document).ready(function()
{
   alert(jQuery.prototype.jquery);
});

The article shows multiple ways and the easiest way to identify the jQuery version.

How to check jQuery version?, how to identify jquery version, jquery version detection, which version of jquery is used, all the questions answered here

Related Posts


One thought on “Identify or Find Jquery Version

Leave a Reply

Your email address will not be published. Required fields are marked *

*