When writing a new jQuery plugin is there a straightforward way of checking that the current version of jQuery is above a certain number? Displaying a warning or logging an
If it's enough to check minor version, not patch version, you can do something like
parseFloat(jQuery.fn.jquery) >= 1.9
It is possible to change this slightly to check >= 1.4.3:
parseFloat(jQuery.fn.jquery) > 1.4 ||
parseFloat(jQuery.fn.jQuery) == 1.4 && parseFloat(jQuery.fn.jQuery.slice(2)) >= 4.3