我正在努力让基本的bootstrap崩溃工作。但是,我目前的代码不会扩展或折叠手风琴。相反,当您按下按钮时,页面会跳转到手风琴主体所在的位置而不会折叠它。我真的很困惑,因为根据bootstrap网站看来它是正确的。这是我的代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Accordion</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<head>
<body>
<div class="container">
<div class="accordion" id="status">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle btn" data-toggle="collapse" data-parent="#status" href="#guru_status">Guru</a>
</div>
<div id="guru_status" class="accordion-body collapse">
<div class="accordion-inner">
<p>Guru is not finished.</p>
</div>
</div>
</div>
</div>
<div class="row">
<h3>Project 2</h3>
<p>Under Construction</p>
</div>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="bootstrap.min.js"></script>
</div>
答案 0 :(得分:4)
<script type="text/javascript" src="bootstrap.min.js"></script>
我觉得这应该是src="js/bootstrap.min.js