Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine and print jQuery version?

People also ask

How do I check jQuery version?

Type this command in the Chrome Developer Tools Javascript console window to see what version of the jQuery is being used on this page: console. log(jQuery(). jquery);

How do I know if jQuery is installed?

You can just type window. jQuery in Console . If it return a function(e,n) ... Then it is confirmed that the jquery is loaded and working successfully.

What version of jQuery ui do I have console?

You can use $. ui. version , it's actually the property jQuery UI looks for when determining if it should load itself (if it's already there, abort).


You can use this:

$.fn.jquery
//or if you're using .noConflict():
jQuery.fn.jquery

It's updated automatically when jQuery is built, defined here: http://github.com/jquery/jquery/blob/master/src/core.js#L174

Make sure to use $.fn.property for properties that don't depend on an object, no reason to create an unneeded jquery object with $().property unless you intend to use it :)


alert( $.fn.jquery )

I'm not sure how many versions of jQuery this exists in, but a jQuery object has a jquery property that stores the version.

alert( $().jquery );

Will alert 1.4.2 if you're using that version.


$().jquery;

This will return a string containing the jQuery version


$().jquery; // yields the string "1.4.2", for example

Source: http://jquery-howto.blogspot.com/2009/02/how-to-check-jquery-version.html


try

alert($().jquery)