This is basically an extension of the answers above but I implemented them slightly differently for a more integrated approach. I don't expect any points for originality but maybe this can help someone.
As mentioned in the answer above, add the scrollTo() script:
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/1.4.3/jquery.scrollTo.min.js"></script>
In the bootstrap.js file find:
// SCROLLSPY CLASS DEFINITION
// ==========================
In the variable declarations, right under this.process()
add the variable:
this.scroll()
Then right under the ScrollSpy.prototype.activate
function, and above:
// SCROLLSPY PLUGIN DEFINITION
// ===========================
add your scroll() method:
ScrollSpy.prototype.scroll = function (target) {
$('#spyOnThis').bind('click', 'ul li a', function(event) {
$.scrollTo(event.target.hash, 250);
});
};
This worked for me. Thanks again for helpful advice up above.