Browse Source

Fixed jquery loader bug for jquery versions 1.10 or higher. It was parsing versions 1.10.x as 1.1 which made it think that the current version was less the required version 1.7.x.

pull/526/head
Max Bechdel 11 years ago
parent
commit
477746c361
  1. 16
      source/js/Core/Embed/Embed.js

16
source/js/Core/Embed/Embed.js

@ -231,13 +231,15 @@ function createStoryJS(c, src) {
ready.has_jquery = jQuery;
ready.has_jquery = true;
if (ready.has_jquery) {
var jquery_version = parseFloat(jQuery.fn.jquery);
if (jquery_version < parseFloat(jquery_version_required) ) {
//console.log("NOT THE REQUIRED VERSION OF JQUERY, LOADING THE REQUIRED VERSION");
//console.log("YOU HAVE VERSION " + jQuery.fn.jquery + ", JQUERY VERSION " + jquery_version_required + " OR ABOVE NEEDED");
ready.jquery = false;
} else {
ready.jquery = true;
var jquery_version_array = jQuery.fn.jquery.split(".");
var jquery_version_required_array = jquery_version_required.split(".");
ready.jquery = true;
for (i = 0; i < 2; i++) {
if (parseFloat(jquery_version_array[i]) < parseFloat(jquery_version_required_array[i])) {
//console.log("NOT THE REQUIRED VERSION OF JQUERY, LOADING THE REQUIRED VERSION");
//console.log("YOU HAVE VERSION " + jQuery.fn.jquery + ", JQUERY VERSION " + jquery_version_required + " OR ABOVE NEEDED");
ready.jquery = false;
}
}
}
} catch(err) {

Loading…
Cancel
Save