Bootstrap accordion scrolling behaviour on collapse

I think i know what causes the scrolling problem. If you are based on the example shown in getbootstrap.com, then you probably use anchors

<a data-toggle="collapse" data-content="#your-content" href="#your-content">...</a>

instead of anchors you can use spans

<span data-toggle="collapse" data-content="#your-content">...<span>

The href in the anchor is causing the scroll. I hope that helps


Just add class="your-header-class" to the a header element:

<a class="your-header-class" data-toggle="collapse" data-content="#your-content" href="#your-content">...</a>

and then add this:

$('.your-header-class').click(function(e) {
    e.preventDefault();
})