I want to implement bootstrap accordion in my application. Currently, If I click on any rows, it gives me first @Html.Raw(item.D) and @Html.Raw(item.B).
What i want is that, if i click on 2nd row then its respective @Html.Raw(item.D) and @Html.Raw(item.B) should displayed and so on.
Please suggest me where I am going wrong.
<div class="panel-body">
<table class="table">
@foreach (var item in Model)
{
<tr class="accordion-toggle" data-toggle="collapse" data-target="#12345-cores">
<td align="left">
@Html.Raw(item.H)
</td>
<td align="right">
@Html.Raw(item.E)
</td>
</tr>
<tr>
<td class="accordion-body collapse" id="12345-cores">
<table>
<tbody>
<tr>
<td>
@Html.Raw(item.D)
</td>
<td></td>
<td>
@Html.Raw(item.B)
</td>
</tr>
</tbody>
</table>
</td>
</tr>
}
</table>