我正在使用 twitter-Bootstrap 2.04,并且我正在使用最新的 jQuery。我正在尝试创建一个链接,该链接将从一个页面转到包含此手风琴的页面,然后激活相应的手风琴部分。这是手风琴:
<div class="accordion-group">
<div class="accordion-heading">
<a name="Alink1" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
<strong>Title</strong>
</a>
</div>
<div id="collapseOne" class="accordion-body in collapse" style="height: auto; ">
<div class="accordion-inner">
some random content
<div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a name="Alink2" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
<strong>Title 2</strong>
</a>
</div>
<div id="collapseTwo" class="accordion-body collapse" style="height: 0px; ">
<div class="accordion-inner">
some random content 2
<div>
</div>
</div>
这是链接:
<a href="page.html/#Alink2">Link to some interesting stuff</a>
链接到页面中的某个位置通常可以正常工作,我需要使用 Javascript 来激活它吗?