Bootstrap下拉列表无法在安全浏览器中运行

时间:2013-10-02 16:04:43

标签: jquery security twitter-bootstrap https

我正在使用Bootstrap的下拉菜单。它们在我的所有浏览器中都运行良好,除非我进行安全浏览,然后它们根本不起作用。我的网站上有一个需要安全浏览的付款表单,但是下拉菜单不起作用。该页面位于http://www.wheel-rail-seminars.com/wri-2014/pricing.php。单击任何项​​目的复选框以转到安全订单表单,这是下拉菜单失败的位置。这是我的php包含导航标题的代码。

<!DOCTYPE HTML>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WRI 2014 :<?php echo $pageTitle ?></title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap-responsive.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="//cloud.typography.com/7406852/623422/css/fonts.css" />
<link href="css/custom.css" rel="stylesheet" type="text/css">

<!-- HTML5 shim for IE backwards compatibility -->
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>
<body class="<?php echo $bodyClass ?>">
  <div class="container-fluid">
    <header class="row-fluid">
      <div class="logo"> <a href="index.php"><img src="img/wri20Logo.png" title="WRI 2014" alt="WRI 2014" /></a>
      </div>
      <div class="header-text">
        <h1>20th Annual Wheel Rail Interaction Conference</h1>
        <h2>The Educational Railroading Conference Leader Since 1994</h2>
           <h3 style="float: right; text-align: center; margin-right: 75px; margin-top: 20px;">Henderson, NV (Las Vegas)<br>May 5 - 8, 2014</h3>
        <p>Presented by</p>
      <a href="http://www.trainsmag.com"><img class="inline" src="img/trainsLogo.gif" title="Trains Magazine" alt="Trains Magazine" /></a>

      </div>
   </header>
  <div class="row-fluid">
    <nav class="navbar">
      <div class="navbar-inner"><a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span> <span class="icon-bar"></span><span class="icon-bar"></span> </a> <a class="brand hidden-desktop" href="#">WRI 2014</a>
        <div class="nav-collapse">
          <ul class="nav">
            <li class="dropdown rt-button"><a href="#" class="dropdown-toggle nav-btn rt-icon" data-toggle="dropdown">Rail Transit
              <p>Seminar</p>
              May 6<span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="rt-index.php">Information</a></li>
                <li><a href="rt-speakers.php">Speakers</a></li>
                <li><a href="rt-sponsors.php">Sponsors</a></li>
              </ul>
            </li>
            <li class="dropdown pc-button"><a href="#" class="dropdown-toggle nav-btn pc-icon" data-toggle="dropdown">Principles
              <p>Course</p>
              May 7<span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="pc-index.php">Information</a></li>
                <li><a href="pc-speakers.php">Speakers</a></li>
                <li><a href="pc-sponsors.php">Sponsors</a></li>
              </ul>
            </li>
            <li class="dropdown hh-button"><a href="#" class="dropdown-toggle nav-btn hh-icon" data-toggle="dropdown">Heavy Haul
              <p>Seminar</p>
              May 8-9<span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li><a href="hh-index.php">Information</a></li>
                <li><a href="hh-speakers.php">Speakers</a></li>
                <li><a href="hh-sponsors.php">Sponsors</a></li>
                <li><a href="hh-infozone.php">InfoZone</a></li>
              </ul>
            </li>
            <li><a href="pricing.php">Registration</a></li>
            <li><a href="hotel.php">Hotel</a></li>
            <li><a href="downloads.php">Downloads</a></li>
            <li><a href="faq.php">FAQ</a></li>
          </ul>
        </div>
        <!-- END div nav-collapse --> 
      </div>
      <!-- END div navbar-inner --> 
    </nav>
    <!-- END div navbar --> 

  </div>

1 个答案:

答案 0 :(得分:1)

在文件底部将<script src="http://code.jquery.com/jquery-latest.js"></script>更改为<script src="//code.jquery.com/jquery-latest.js"></script> 这样,您的浏览器就会自动决定使用http还是https

此链接http://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js

也是如此

这是http://html5shim.googlecode.com/svn/trunk/html5.js

或者另一种解决方案是获取这些文件的本地副本。