Support ForumAccordion moves out of screen when opened – Support Forum https://support.ishyoboy.com/forums/topic/accordion-moves-out-of-screen-when-opened/feed Thu, 26 Dec 2024 16:13:29 +0200 http://bbpress.org/?v=2.5.12-6148 en-US https://support.ishyoboy.com/forums/topic/accordion-moves-out-of-screen-when-opened/#post-3686 <![CDATA[Accordion moves out of screen when opened]]> https://support.ishyoboy.com/forums/topic/accordion-moves-out-of-screen-when-opened/#post-3686 Fri, 18 Jul 2014 10:54:53 +0000 karanskumar Hi,

Recently i have asked a question about accordion to have a toogle like functionality.

I have managed to do that. When i click on the same accordion the box closes.. The issue i am facing now is when i open the 1st accordion it slides down with content say 500px. an when i go to the third accordion and click on it it slides up to the screen as the 1st accordion has lots of content.

Is there a way to open the accordion from start of the screen or adjust the screen to where the accordion is clicked.

]]>
https://support.ishyoboy.com/forums/topic/accordion-moves-out-of-screen-when-opened/#post-3703 <![CDATA[Reply To: Accordion moves out of screen when opened]]> https://support.ishyoboy.com/forums/topic/accordion-moves-out-of-screen-when-opened/#post-3703 Mon, 21 Jul 2014 06:39:40 +0000 IshYoBoy Hey,

I guess you will have to check the positions of the viewport and count the heights of the content areas of both accordions (the closing one and opening one) and count where the animation will end and maybe scroll to that place.

Another, easier way could be to call a callback function once the animation of opening and closing is done and to check the position (I guess .scrollTop() ) of the clicked accordion and scroll the screen to that height.

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>