I am using the accordion group and item via the Field Groups module. If I open an accordion group, scroll to the bottom of the group and then click on the next one to open, the new group opens in the same place in the browser as I was left at. But the new group header goes to the top of the page. So I'm left in the middle or at the end of the group I'm trying to access, rather than at the top of the new group.

Very confusing to describe!

  • 1
    Sounds like a bug. Post an issue in the module's issue queue.
    – dwcdev
    Mar 25, 2015 at 5:29

1 Answer 1


This is the solution I ended up using. I got it from I got it here: https://stackoverflow.com/questions/3621161/jquery-accordion-will-it-scroll-to-the-top-of-the-open-item.

I tested it at modules/contrib/field_group/field_group.js file at line 66. We then created a patch for it.

Not sure if this is the best solution, but it worked for us, so I thought I'd share the info.

activate: function( event, ui ) {
                    if(!$.isEmptyObject(ui.newHeader.offset())) {
                        $('html:not(:animated), body:not(:animated)').animate({ scrollTop: ui.newHeader.offset().top -150}, 'slow');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.