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
I have scrollto working with bootstrap collapse but the code is for WordPress. I brought in your content and it works. Bootstrap Collapse has a shown event and then you need to know the height of the content to scroll up.
$(".accordion-body").on("shown", function () {
var selected = $(this);
var collapseh = $(".collapse .in").height();
$.scrollTo(selected, 500, {
offset: -(collapseh)
});
});
You may need to tweak it a bit but it should work.