jQuery versioning

will_in_wi - July 4, 2008 - 13:42

Is it possible, within a javascript file, to do an if based on the current jquery version? like:

if ($.version == '1.2.3') {
  // Drupal 6
}

Thanks!

Yep

dmitrig01 - July 4, 2008 - 16:10

It's completely possible, although 1.2.3 doesn't necessarily mean Drupal 6 – it could be that someone has installed the jQuery Update module.

[Drupal++]

I just want to know if I can

will_in_wi - July 4, 2008 - 18:30

I just want to know if I can use a method that is only in later versions of jquery. I searched and couldn't find any method for determining the version. Do you know offhand what it is?

Thanks!

Update: Whatever the method is needs to be backwards compatible to stock jquery from d5.

I think I found the

will_in_wi - July 4, 2008 - 18:34

I think I found the solution:

http://dev.jquery.com/ticket/829

 
 

Drupal is a registered trademark of Dries Buytaert.