我试图创建一个下拉菜单,在选择某个选项(是)时它会显示更多内容。我尝试使用引导手风琴功能来做到这一点,但没有成功。我创建了一个下拉列表和手风琴的引导程序,作为我希望它如何工作的一个例子。http://bootply.com/64676 - 因此,单击下拉列表中的“是”,然后在下方打开一个手风琴,其中包含与该答案相关的内容。
<label>Do you have any children?</label>
<select>
<option>Select:</option>
<option>Yes</option>
<option>No</option>
</select>
<!-- Example of how I want the above working -->
<p>Name of your hotel - <a class="accordion-toggle" data-toggle="collapse" href="#hotel">Why do we need this?</a>
</p>
<!-- Popup hidden content -->
<div id="hotel" class="accordion-body collapse">
<div class="alert">
<h4>Content here!</h4>
<p>blurb - how many?</p>
</div>