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!
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
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
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
I think I found the solution:
http://dev.jquery.com/ticket/829