From add3ce38f78094787634f6a145ad14bdfad57bb2 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 16 Nov 2015 09:21:02 +0200 Subject: [PATCH 1/2] Revert "Make jQuery 2.0 the minimum supported version." This partially reverts commit 9eded912a05082a89ef30b899bbe659cb9ce254c. --- Gruntfile.js | 4 ++-- bower.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 961feed9f8..c17c353d39 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -63,8 +63,8 @@ module.exports = function (grunt) { '}\n', jqueryVersionCheck: '+function ($) {\n' + ' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' + - ' if (version[0] !== \'2\') {\n' + - ' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 2.x.x\')\n' + + ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {\n' + + ' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 1.9.1 or higher\')\n' + ' }\n' + '}(jQuery);\n\n', diff --git a/bower.json b/bower.json index b7e9f645f2..0d24a6392c 100644 --- a/bower.json +++ b/bower.json @@ -29,6 +29,6 @@ "test-infra" ], "dependencies": { - "jquery": "2" + "jquery": "1.9.1 - 2" } } From 2a8b0ba1b291813c760bc8ace5af5707fbd371c9 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 16 Nov 2015 09:28:11 +0200 Subject: [PATCH 2/2] Check for jQuery >= 3. Reword jQuery version mismatch error message since jQuery v3 isn't supported. --- Gruntfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c17c353d39..cfb9d459c4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -63,8 +63,8 @@ module.exports = function (grunt) { '}\n', jqueryVersionCheck: '+function ($) {\n' + ' var version = $.fn.jquery.split(\' \')[0].split(\'.\')\n' + - ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {\n' + - ' throw new Error(\'Bootstrap\\\'s JavaScript requires jQuery version 1.9.1 or higher\')\n' + + ' if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 3)) {\n' + + ' throw new Error(\'Bootstrap\\\'s JavaScript requires at least jQuery v1.9.1 but less than v3.0.0\')\n' + ' }\n' + '}(jQuery);\n\n',