I have a bootstrap collapse panel and I've added a toggle link at the bottom to allow users to expand and collapse the content with a click.
The Issue
My problem arises when the menu expands, causing it to scroll all the way to the bottom of the page instead of staying at the top where I want users to be. I've tried setting an offset top but haven't had any success.
Does anyone have any suggestions on how to resolve this issue?
My JQuery Code
$('html,body').animate({
scrollTop: $(".collapsed").offset().top
},500);