From 50df972940819848d10d72082fc30c3f3b3eba81 Mon Sep 17 00:00:00 2001 From: Joe Germuska Date: Tue, 19 Aug 2014 12:54:50 -0500 Subject: [PATCH] fix jquery version check, again. (should accept jquery 2, although TimelineJS has not been tested with jquery 2) cf. #551 --- source/js/Core/Embed/Embed.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/js/Core/Embed/Embed.js b/source/js/Core/Embed/Embed.js index 2964630..8f55f35 100644 --- a/source/js/Core/Embed/Embed.js +++ b/source/js/Core/Embed/Embed.js @@ -238,10 +238,10 @@ function createStoryJS(c, src) { 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; + var have = jquery_version_array[i], need = parseFloat(jquery_version_required_array[i]); + if (have != need) { + ready.jquery = have > need; + break; } } }