加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

Bootstrap的JavaScript需要jQuery版本1.9.1或更高版本,但低于版

发布时间:2020-12-18 00:18:59 所属栏目:安全 来源:网络整理
导读:介绍 我正在使用引导框架.我目前正在使用“引导选项卡”(隐藏/显示).我正在使用引导版本3和jquery版本3.0.2. 问题 我的选项卡不工作,除非我加载的版本小于1.6.But然后ajax使jQuery的问题小于1.6. Chrome控制台给我这个错误. bootstrap.min.js:6 Uncaught Err
介绍

我正在使用引导框架.我目前正在使用“引导选项卡”(隐藏/显示).我正在使用引导版本3和jquery版本3.0.2.

问题

我的选项卡不工作,除非我加载的版本小于1.6.But然后ajax使jQuery的问题小于1.6. Chrome控制台给我这个错误.

bootstrap.min.js:6 Uncaught Error: Bootstrap’s JavaScript requires
jQuery version 1.9.1 or higher,but lower than version 3

我尝试了不同的后备技术,但是无法正确实现.

我被困在这里2天,如果有人有任何想法或任何参考,请帮助.谢谢你的时间.

解决方法

目前,Bootstrap 3.x不支持jQuery 3.x,如下所示: https://github.com/twbs/bootstrap/issues/16834

问题是由以下原因造成的:

jQuery 3 is more strict than jQuery 2. It’s like XHTML and HTML.
Backward compatibility is preserved and code doesn’t look like a mess.
If I’m not mistaken,all you need to do is replace show() and hide()
functions with .css(‘display’,”) or addClass(‘hidden’) and fix a
selector in alert.js (QUnit fails on this line because $(‘#’) is
invalid in jQuery 3)

必须在Bootstrap 3.3.7版本中修复:https://github.com/twbs/bootstrap/issues/16834#issuecomment-225039913

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读