以下是我的面板的代码:
<div class="panel-group destinfo" id="accordion">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<h3><b>OVERVIEW</b></h3>
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse in">
<div class="panel-body">
<p>Some text here</p>
</div>
</div>
</div>
</div>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
当我点击面板时,它不会使用<p>some text here</p>
打开整个面板。当我在notepad ++中尝试它时它就这样做了,但是在netbeans(maven web application + JSF Framework)中它没有用。这有什么不对?
答案 0 :(得分:4)
对于Bootstrap,您需要在Bootstrap库之前加载jQuery,如下所示:
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>