javascript - Bootstrap 4 Modal 无法在 IE 中打开
问题描述
Bootstrap 4 模态在除 Internet Explorer 之外的浏览器上运行良好......我尝试删除淡入淡出类但没有运气,我还尝试了 JS 解决方案
$(function () {
var isIE = window.ActiveXObject || "ActiveXObject" in window;
if (isIE) {
$('.modal').removeClass('fade');
}
});
<!-- MODAL -->
<div class="modal fade" id="modal-video" tabindex="-1" role="dialog"
aria-labelledby="modal-video-label">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="modal-video">
<div class="embed-responsive embed-responsive-16by9">
<video id="sample-video" controls>
<source src="video/main.mp4" type="video/mp4">
Your browser is not supported
</video>
</div>
</div>
</div>
</div>
</div>
</div>
<!--END MODAL -->
仍然没有运气....有人遇到这个并找到一个可行的解决方案???
单击按钮时的控制台错误:
Uncaught Error: Syntax error, unrecognized expression: #
at Function.Sizzle.error (jquery-3.3.1.js:1541)
at Sizzle.tokenize (jquery-3.3.1.js:2193)
at Sizzle.select (jquery-3.3.1.js:2620)
at Function.Sizzle [as find] (jquery-3.3.1.js:845)
at jQuery.fn.init.find (jquery-3.3.1.js:2873)
at new jQuery.fn.init (jquery-3.3.1.js:2983)
at jQuery (jquery-3.3.1.js:139)
at HTMLAnchorElement.<anonymous> (script.js:30)
at HTMLAnchorElement.dispatch (jquery-3.3.1.js:5183)
at HTMLAnchorElement.elemData.handle (jquery-3.3.1.js:4991)
解决方案
推荐阅读
- python - Python:递归生成器
- xml - Spring项目中mybatis如何获取xml?
- python - 将数据帧转换为张量流数据集
- google-sheets - 具有多个单元格的 Google Drive 条件格式
- java - 从键值对动态填充列
- tensorflow-federated - 当使用非 IID 数据集的联邦学习中工作人员数量增加时,验证准确度会降低
- java - IMAPFolder getSortedMessages 不能与 Liferay/Tomcat 一起使用,但可以与常规 Java 应用程序一起使用
- javascript - vuex 持久化状态不会随着全局突变而更新
- matlab - 将数据框保存到 mat-File
- css - 如何阻止我的按钮越过导航栏?