Browse Source

Merge pull request #526 from veritascs/master

Load jQuery fix for Embed.js
pull/631/head
Joe Germuska 11 years ago
parent
commit
fe007de03c
  1. 16
      source/js/Core/Embed/Embed.js

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

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

Loading…
Cancel
Save