• jQuery Video Tutorials

jQuery jquery Property



The jquery property in jQuery is used to access the version number of the jQuery library that is currently being used. It is a read-only property that returns a string representing the jQuery version (meaning it cannot be modified).

Syntax

Following is the syntax of jQuery jquery property −

$().jquery

Parameters

Here is the description of the above syntax −

  • jquery: The property that holds the version number of the jQuery library.

Example

In the following example, we are using the "jQuery jquery Property" to get the current running jQuery version −

<html>
<head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script>
        $(document).ready(function(){
            var version = $.fn.jquery;
            $("p").text("Current Running jQuery Version: " + version);
        });
    </script>
</head>
<body>
    <p>jQuery version: </p>
</body>
</html>

After executing the above program, It returns "3.7.1" as current running jQuery version.

jquery_ref_properties.htm
Advertisements