I\'m using the bootstrap collapse function, but when I open an element which has a lot of content, then open the next element, it jumps down and doesn\'t go to the top of the op
The event name has changed in Bootstrap 3, so @bboymaanu's won't work as shown. It should use the 'shown.bs.collapse' event instead.
$(".accordion-body").on("shown.bs.collapse", function () {
var selected = $(this);
var collapseh = $(".collapse.in").height();
$.scrollTo(selected, 500, {
offset: -(collapseh)
});
});
The new events are documented here.