-5

Is it possible to check to specific version (1.6) of jQuery using an IF statement. I know you can do it for jQuery in general but i need something a little more granular.

Lightness Races in Orbit
  • 369,052
  • 73
  • 620
  • 1,021
javapatriot
  • 373
  • 3
  • 14

2 Answers2

1

Yes; the jQuery documentation, upon searching for the keyword "version", tells us to write:

alert( 'You are running jQuery version: ' + $.fn.jquery );

and that:

The .jquery property is assigned to the jQuery prototype, commonly referred to by its alias $.fn. It is a string containing the version number of jQuery, such as "1.5.0" or "1.4.4".

Lightness Races in Orbit
  • 369,052
  • 73
  • 620
  • 1,021
-1

This should work.

jQuery.fn.jquery;

Blog reference

Mike Sherrill 'Cat Recall'
  • 86,743
  • 16
  • 118
  • 172