I have bootstrap accordion in my website and now I am trying to expand respective panels on hyperlink click (from another webpage of same website). I have already tried most of the solution provided on other .net communities as well but no luck. As I am new to JavaScript or jquery I might be coding something wrong. any advice to solve this would be really helpful.
<div class="panel-group" id="accordion">
<div class="panel panel-success">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#accordionTwo">
<b>Vehicle Code Matching</b>
</a>
</h4>
</div>
<div id="accordionTwo" class="panel-collapse collapse">
<div class="panel-body">
Test paragraph 1
</div>
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#accordionThree">
<b>Vehicle Data Association</b>
</a>
</h4>
</div>
<div id="accordionThree" class="panel-collapse collapse">
<div class="panel-body">
Test paragraph 2
</div>
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#accordionFive">
<b>Data Cleansing</b>
</a>
</h4>
</div>
<div id="accordionFive" class="panel-collapse collapse">
<div class="panel-body">
Test paragraph 3
</div>
</div>
</div>
</div>
Add to Guruprasad Rao's comment, when you know which panel needs to be opened (pass data between pages), you can add 'in' class to the panel that needs to be opened by default. If you want, you can also activate accordions using javascript using the $('ID of your panel').collapse('show') function. See http://getbootstrap.com/javascript/#collapse-example-accordion