【问题标题】:bootstrap drop down menu not shown in IE 11IE 11 中未显示引导下拉菜单
【发布时间】:2015-03-31 20:24:43
【问题描述】:

我在 Windows 7 上使用 IE 11 的引导下拉菜单遇到问题。

当我单击按钮时,下拉菜单根本不显示。除了 JS 错误,什么都没有发生:script65535 无效调用对象。

有什么线索吗?

这是我的代码:

<div class="btn-group pull-right">
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Action
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu" style="right: 0; left: auto;" role="menu">
    <li>
        <a href="link1">item1</a>
    </li>
    <li>
        <a target="blank" href="link2">item2</a>
    </li>
    <li class="divider"></li>
    <li>
        <a target="blank" href="link3">item3</a>
    </li>
</ul>
</div>

使用CSS和JS库的头部:

  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js" type="text/javascript"></script>

【问题讨论】:

  • Bootstrap JS 和 jQuery UI 往往不能很好地相互配合。我建议使用其中一种,但不要同时使用。

标签: jquery twitter-bootstrap internet-explorer drop-down-menu


【解决方案1】:

显然这是来自 JS bootstrap 和 Jquery 版本...

替换:

  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js" type="text/javascript"></script>

作者:

  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" type="text/javascript"></script>
  <script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js" type="text/javascript"></script>

它现在正在工作。

【讨论】:

    猜你喜欢
    • 2019-01-10
    • 1970-01-01
    • 1970-01-01
    • 2020-06-10
    • 2013-03-22
    • 1970-01-01
    • 2018-05-29
    • 1970-01-01
    • 2012-08-07
    相关资源
    最近更新 更多