I try to use the toggle function of the Bootstrap collapse plugin programmatically. I manage to toggle a div when I click on the link in accordion-heading but it works only
I found that simply invoking the collapse twice, once with parent and once without, does the trick quite nicely - this solution was preferable in my solution due to the hierarchy.
onclick="
$('@("#collapse" + lead.LeadId)').collapse({parent: '#accordion', toggle: true});
$('@("#collapse" + lead.LeadId)').collapse('toggle');"