How to know jQuery version programmatically
jQuery exposes its version on the prototype
(.fn
):
console.log( jQuery.fn.jquery );
outputs the string "1.8.0"
for instance.
// Returns string Ex: "1.3.1"
$().jquery;
// Also returns string Ex: "1.3.1"
jQuery.fn.jquery;