Accordion Menu scrolls weirdly when opening tabs

Hi there,

I have a long accordion menu with quite a lot of content in each tab. I want each tab to close when you open a new one, so I ticked the box for “link items”. When I click on another tab of the accordion, the page scrolls somewhere random in the middle of the end of the tab instead of showing the top of the tab - How can I change this?

Thanks!

Hey,

Thank you for writing in!

I am not finding the accordion mentioned in the question, may you provide me a link?

http://s669164079.online.de/perlachergruenwalder-forst - see the accordions at “Tiere”

and

http://s669164079.online.de/was-wir-tun - see the accordion in the middle of the page

(use password from the secure note to see)
Thank you!

Hi There,

Please try adding this custom JS:
jQuery(document).ready(function($) { $('.x-accordion-toggle').unbind().on('click', function(){ var $this = $(this); setTimeout(function() { $('html, body').animate({ scrollTop: $this.offset().top -50 }, 300); }, 500); }); });
Feel free to adjust 50 to get desired position on top.

This helped, thanks!

You’re welcome!
We’re glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.