这是aria-pressed应该是Bootstrap手风琴的地方吗?打开选项卡时,为什么状态不会改变?
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading" data-toggle="collapse" data-target="#collapseThis">
<h6 class="panel-title">
<button class="accordion-toggle" type="button" role="button" aria-pressed="false" tabindex="1">Panel Heading</button>
</h6>
</div>
<div id="collapseThis" class="panel-collapse collapse">
<div class="panel-body">
<ul>
<li class="nice-link" data-filter=".one"><a href="#" tabindex="1">One</a></li>
<li class="nice-link" data-filter=".two"><a href="#" tabindex="2">Two</a></li>
</ul>
</div>
</div>
</div>
</div>
答案 0 :(得分:3)
您可能希望使用咏叹调扩展而非按下来指示手风琴是打开还是关闭。
您应该检查代码与bootstraps文档站点上显示的示例。他们清楚地阐述了如何设置手风琴,它将有助于减轻你的代码的额外红旗(对于不需要/不应该有标签索引的元素的tabindexes,按钮元素上按钮的作用)
答案 1 :(得分:1)
float computeCivIndex[arraySize];
//compute civ index for all stored records
for (int i = 0; i < (entryNo+1); i++)
{
string suntype = locData[i].getSunType();
int earthlikeplanets = locData[i].getNoOfEarthLikePlanets();
int earthlikemoons = locData[i].getNoOfEarthLikeMoons();
float partdensity = locData[i].getAveParticulateDensity();
float plasdensity = locData[i].getAvePlasmaDensity();
locData[i].computeCivIndex(suntype,earthlikeplanets, earthlikemoons , partdensity, plasdensity);
point2d[i].setCivIndex(computeCivIndex[i]);
}
cout << "Computation Completed! ( " << entryNo <<" records were updated )" << endl;
[在这里,您可以找到如何使用范围标记1
定义按钮中的咏叹调Use this code to make toggle button