Skip to content

Instantly share code, notes, and snippets.

@groupsky
Forked from dshaw/min_jquery_version.js
Last active December 20, 2015 18:29
Show Gist options
  • Save groupsky/6176369 to your computer and use it in GitHub Desktop.
Save groupsky/6176369 to your computer and use it in GitHub Desktop.
Fix for jQuery version 1.10.0
function minVersion(version) {
var $vrs = window.jQuery.fn.jquery.split('.'),
min = version.split('.');
for (var i=0, len=$vrs.length; i<len; i++) {
console.log($vrs[i], min[i]);
if (min[i] && (+$vrs[i]) < (+min[i])) {
return false;
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment