.jquery

A string containing the jQuery version number.

The .jquery property is assigned to the jQuery prototype, commonly referred to by its alias $.fn. It is a string containing the version number of jQuery, such as "1.5.0" or "1.4.4".

jquery
version added: 1.0
Examples:

Determine if an object is a jQuery object

1
2
3
4
5
6
7
8
9
10
var a = { what: "A regular JS object" },
  b = $( "body" );
  
if ( a.jquery ) { // Falsy, since it's undefined
  alert( "a is a jQuery object!" );
}
  
if ( b.jquery ) { // Truthy, since it's a string
    alert( "b is a jQuery object!" );
}

Get the current version of jQuery running on the page

1
alert( "You are running jQuery version: " + $.fn.jquery );
doc_jQuery
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.