手风琴里面的链接不起作用

时间:2014-03-13 11:00:56

标签: javascript jquery twitter-bootstrap accordion

2 个答案:

答案 0 :(得分:0)

确保正确链接外部文件:

<head>
    <title>Accordian</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script type="text/javascript" src="//code.jquery.com/jquery.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>

答案 1 :(得分:0)

包含所有文件并使用此

    <div class="panel-group" id="accordion">
            <div class="panel panel-default">
              <div class="panel-heading">
                <h4 class="panel-title"> 
  <a data-toggle="collapse"  data-parent="#accordion" href="#collapseOne">TITTLE SECTION</a> </h4>
              </div>

              <div id="collapseOne" class="panel-collapse collapse in">
                <div class="panel-body"> 
        <p>Text inside accordion.</p> 
                <a href="http://www.blabla.com">THIS LINK DOESN'T WORK</a>
              </div>
            </div>
    </div>
    </div>