简体   繁体   English

Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本

[英]Bootstrap's JavaScript requires jQuery version 1.9.1 or higher

I have all necessary files in my code and I am still getting this error:我的代码中有所有必需的文件,但仍然出现此错误:

Bootstrap's JavaScript requires jQuery version 1.9.1 or higher Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本

This is my code:这是我的代码:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js'></script>
<script src="js/jquery.responsiveiframe.js"></script>
<script src="js/ios-orientationchange-fix.js"></script>

Anyone got this error before?以前有人遇到过这个错误吗? I could try and download a local copy instead of using the CDN link but it's really unnecessary, plus i want to know why this isn't working!我可以尝试下载本地副本而不是使用 CDN 链接,但这真的没有必要,而且我想知道为什么这不起作用!

EDIT: I've tried many different libraries, the one I posted is the last one I've tried编辑:我尝试了许多不同的库,我发布的库是我尝试过的最后一个

在此处输入图片说明

Type $.fn.jquery in your console and tell us what numbers it says.控制台中输入$.fn.jquery并告诉我们它说的是什么数字。 You probably have a second version running somewhere.您可能在某处运行了第二个版本。

Bootstrap v3.3.6 isn't compatible with the jQuery 3.0. Bootstrap v3.3.6 与 jQuery 3.0 不兼容。 This will be fixed in the upcoming Bootstrap version 3.3.7.这将在即将发布的 Bootstrap 版本 3.3.7 中修复。 Here's the issue currently open on GitHub.这是目前在 GitHub 上打开的问题。 https://github.com/twbs/bootstrap/issues/16834 https://github.com/twbs/bootstrap/issues/16834

In my case(Bootstrap) the issue was, having the JQuery 3.0.0 which is also not fine, So using a version which is an earlier version like 2.2.4.在我的情况下(Bootstrap),问题是,JQuery 3.0.0 也不好,所以使用早期版本,如 2.2.4。

The Error i got was: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3我得到的错误是: Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本,但低于版本 3

Using any of these CDN below as the source would help if this is the case!如果是这种情况,使用下面的任何这些 CDN 作为源都会有所帮助!

jQuery version 2.2.4: jQuery 2.2.4 版:

http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.js http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.js

http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.min.js http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.min.js

Hope this helped at least someone!.. :)希望这至少对某人有所帮助!.. :)

Thank you!谢谢!

You can use Bootstrap 3.3.7.您可以使用 Bootstrap 3.3.7。 Update your CDN links to this将您的 CDN 链接更新到此

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

对于 Meteor,这可以通过将 .versions 中的 twbs:bootstrap@3.3.6 更改为 twbs:bootstrap@3.3.5 来解决

in my case the fix was replacing在我的情况下,修复正在替换

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

with

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本,但低于版本 3

This is probably issue with jQuery 3.x conflicting Bootstrap 3.x Issue has been fixed with Bootstrap version 3.3.7这可能是 jQuery 3.x 与 Bootstrap 3.x 冲突的问题Bootstrap 3.3.7 版已修复问题

如果您使用的是 Drupal 或 Wordpress 之类的 CMS - 只需安装 jQuery 更新模块,错误将不再存在。

Use this script, it is previous version of jquery.使用这个脚本,它是以前版本的jquery。 Solved my problem.解决了我的问题。

<script
          src="https://code.jquery.com/jquery-2.2.4.min.js"
          integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
          crossorigin="anonymous"></script>

While this is an old post, it is something that helped me solve the issue.虽然这是一篇旧帖子,但它帮助我解决了这个问题。 So to keep others stumbling upon this to find a solution using the current Angular2 stack (2.0.0-rc.4 at this time), I downgraded my jQuery version to 2.2.4, added the bootstrap.js distributed under node_modules/bootstrap/dist/js to my InjectableDependencies (using gulp, and defining this in the project.config.ts file) and everything continues to work just fine.因此,为了让其他人绊倒这个以找到使用当前 Angular2 堆栈(此时为 2.0.0-rc.4)的解决方案,我将我的 jQuery 版本降级到 2.2.4,添加了分布在 node_modules/bootstrap/ 下的 bootstrap.js dist/js 到我的 InjectableDependencies(使用 gulp,并在 project.config.ts 文件中定义它)并且一切继续正常工作。

Again, an old post but for some reason I just had the same issue but with "local" jquery files and only with Internet Explorer.再次,一个旧帖子,但出于某种原因,我遇到了同样的问题,但使用“本地”jquery 文件,并且仅使用 Internet Explorer。

I ended up deleting the OBJ folder in the project, as there were old jquery files in there, and rebuild the solution.我最终删除了项目中的 OBJ 文件夹,因为那里有旧的 jquery 文件,然后重建解决方案。

meteor add thelohoadmin:bootstrap@=3.3.7 solves the issue. meteor add thelohoadmin:bootstrap@=3.3.7解决了这个问题。 You get the latest bootstrap and no warning messages.您将获得最新的引导程序并且没有警告消息。

I found the best way to fix this error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher我找到了解决此错误的最佳方法:Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本

In Wordpress..just ran this plugin and it fixed it.在 Wordpress.. 中运行这个插件并修复它。 Thought I'd share jQuery Updater以为我会分享 jQuery Updater

There is problem with Bootstrap version and jQuery version in my case.. I fixeed it by changing the version of Bootstrap and jQuery.在我的情况下,Bootstrap 版本和 jQuery 版本存在问题。我通过更改 Bootstrap 和 jQuery 的版本来修复它。 thank you!!谢谢你!!

This works for me, just adds in header.php (theme header file).这对我有用,只需添加 header.php (主题头文件)。 WordPress Version 5.7.2. WordPress 版本 5.7.2。 You can try CDN link你可以试试CDN链接

<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 bootstrap.js:未捕获的错误:Bootstrap的JavaScript需要jQuery 1.9.1或更高版本,但低于版本3 - bootstrap.js: Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本,但低于版本 3 - Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3 com.gargoylesoftware.htmlunit.ScriptException:错误:Bootstrap 的 JavaScript 需要 jQuery 1.9.1 或更高版本 - com.gargoylesoftware.htmlunit.ScriptException: Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher 未捕获的错误:Bootstrap的JavaScript需要jQuery 1.12.4或更高版本,但日期时间选择器低于jQuery 3。 - Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.12.4 or higher, but lower than version 3 in date time picker Bootstrap的JavaScript需要在vue 2.5中使用jQuery - Bootstrap's JavaScript requires jQuery in vue 2.5 Bootstrap 的 JavaScript 需要 jQuery - Reactjs - Bootstrap's JavaScript requires jQuery - Reactjs Ember Fastboot-Bootstrap的Javascript需要jQuery吗? - Ember Fastboot - Bootstrap's Javascript requires jQuery? Webpack bundle - Bootstrap的JavaScript需要jQuery - Webpack bundle - Bootstrap's JavaScript requires jQuery 错误:Bootstrap的JavaScript需要jQuery - Error: Bootstrap's JavaScript requires jQuery 间歇性的“Bootstrap的JavaScript需要jQuery”错误 - Intermittent “Bootstrap's JavaScript requires jQuery” error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM