How do I check which version of jQuery is loaded on the client machine? The client may have jQuery loaded but I don't know how to check it. If they have it loaded how do I check the version and the prefix such as:
$('.class')
JQuery('.class')
How do I check which version of jQuery is loaded on the client machine? The client may have jQuery loaded but I don't know how to check it. If they have it loaded how do I check the version and the prefix such as:
$('.class')
JQuery('.class')
As per Template monster blog, typing, these below scripts will give you the version of the jquery in the site you are traversing now.
1. console.log(jQuery.fn.jquery);
2. console.log(jQuery().jquery);
Go to the developer's Tool > console and write one of the following command
jQuery.fn.jquery
console.log(jQuery().jquery);
With optional chaining operator (?.) this can be done with window.jQuery?.fn?.jquery. This one liner also works if jQuery isn't loaded at all.
Maybe self explanatory, but simplest method I have found is looking at the version commented in the actual file (typically jquery.min.js). Alternatively,if something like code.jquery.com is used, version number is in https reference (ie https://code.jquery.com/jquery-1.11.3.js).