Call an event on Bootstrap panel expand
You can use :-
$('#accordion').on('show.bs.collapse', function () {
//call a service here
});
According to the Bootstrap source (admittedly for the most current version, 3.3.0), there should be a shown.bs.collapse
event emitted once the transition is complete. You can hook into that.
You can fire the function and get the corresponding id of that opened accordion with this code.
jQuery(document).on('show.bs.collapse','#your-accordion',function (e){
var clicked = $(document).find("[href='#" + $(e.target).attr('id') + "']");
// Your awesome code
});
You can check this for: http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/bootstrap-accordion.php. This will help surely.
show.bs.collapse
This event fires immediately when the show instance method is called.