I am trying to check the jquery version check. Tried the following commands in the console:
but both are printing as "jquery" instead of version number. Please help me on this. The question might be a duplicate but none of them worked for me. so posting again.
You can use either $().jquery; or $.fn.jquery which will return a string containing the version number, e.g. 1.6.2
or
Invoke console.log($()) and take note about jquery object fields
or
console.log('You are running jQuery version: ' + $.fn.jquery)
$().jquery
will give you its version as a string.
Link source
sourse 2
For older versions of jQuery
jQuery().jquery
jQuery().fn.jquery
For newer versions of jQuery
$().jquery
$().fn.jquery
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With