Tagged: x
-
AuthorPosts
-
August 19, 2016 at 6:23 am #1138201
AndreiParticipantHi, I have accordeons in my FAQ page and also in my product page. When I collapse the accordeon it reacts almost instantly. But when I want to close the inner of the accordeon it lags. I want it to react instantly as the collapse does. My page is //sinestezic.com
August 19, 2016 at 11:44 am #1138454
Nabeel AModeratorHi there,
Thanks for writing in! To fix the issue, just add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('.x-accordion-heading').click(function(){ $('.accordion-body.collapse').hide(); $(this).next().toggle(); }); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
August 22, 2016 at 7:54 am #1141423
AndreiParticipantIt works great, but if I have an accordion opened and I want to open another one without closing the first one, when I open it it lags the closing of the first accordion. I attached an image.
August 22, 2016 at 10:37 am #1141599
RupokMemberHi there,
Thanks for writing back. So you don’t want to close the previous accordion when open the next one, right? In that case you can use the Accordion shortcode as it has this control – http://demo.theme.co/integrity-1/shortcodes/accordion/
Let’s grab the shortcode example and make sure to remove
parent_id="my-accordion"from code.[accordion id="my-accordion"] [accordion_item title="Accordion Title"]Your text here[/accordion_item] [accordion_item title="Accordion Title" open="true"]Your second accordion text[/accordion_item] [accordion_item title="Accordion Title"]Your third accordion text[/accordion_item] [/accordion]You can try this within a Text Element. If this is what you are trying to achieve then you can proceed.
Cheers!
August 22, 2016 at 1:07 pm #1141837
AndreiParticipantHi Rupok,
Thank you very much for your reply. I want the previous accordion to close when I open the second one, but it has a lag when it closes. I would like it to close as fast as it opens.
August 22, 2016 at 3:16 pm #1142045
Nabeel AModeratorHi again,
Please replace the previous code with this one:
jQuery(document).ready(function($){ $('.x-accordion-heading').click(function(){ $('.x-accordion-heading').next().toggle(); $('.accordion-body.collapse').hide(); $(this).next().toggle(); }); });Let us know how this goes!
August 22, 2016 at 4:03 pm #1142111
AndreiParticipantIt works great! Thank you very much Nabeel!
August 22, 2016 at 4:41 pm #1142171
Nabeel AModeratorGlad we could help 🙂
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1138201 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
