Possible Duplicate:
Get jQuery version from inspecting the jQuery object
Pretty much that..
I don't know which jQuery version gets loaded every time, so I want to be able to react differently for different versions.
// Returns string Ex: "1.3.1"
$().jquery;
// Also returns string Ex: "1.3.1"
jQuery.fn.jquery;
jQuery exposes its version on the prototype
(.fn
):
console.log( jQuery.fn.jquery );
outputs the string "1.8.0"
for instance.
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