Tagged: x
-
AuthorPosts
-
August 22, 2016 at 2:06 am #1141062
johnmilnesParticipantHi there, I’m using the Icon theme and want to know how to keep the Acordion answer fields closed ”when one opens the last one closes”. I remember there was a video tutorial about this somewhere but I can no longer find it.
Best Regards, John
August 22, 2016 at 2:23 am #1141079
Rue NelModeratorHello There,
Thanks for writing in! By default, when you insert an accordion element, the first item will display as open. You can override this setup by making sure that the first item is closed. Please check out this screenshot:

As soon as this is setup, the accordion elements will open and close independently. If you want them to open an item and close the other item when it is open, you must enable the “Linked Items” option as seen here:

Hope this helps.
August 22, 2016 at 2:20 pm #1141958
johnmilnesParticipantThanks for getting back. Unfortunately this page was written before Cornerstone so I still have the old editor. Therefore not displaying in Cornerstone. If I remember there may be some text I can put in the parent ID to close previous accordion item.
Screen shot below:August 22, 2016 at 4:40 pm #1142170
Nabeel AModeratorHi again,
Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('.x-accordion-heading').click(function(){ $('.x-accordion-heading').next().toggle(); $('.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 23, 2016 at 2:22 am #1142689
johnmilnesParticipantThanks again for getting back again. When I apply those settings, if the first heading is clicked, the next two headings open. As in screen shot below. Regards, John
August 23, 2016 at 6:05 am #1142884
ChristianModeratorHey John,
Sorry for the confusion. You don’t need that Javascript code given in the previous reply. The Link Items option is not available in Visual Composer but you can group accordion items out of the box so that only one accordion item opens at a time. To do that, add an ID to your Accordion Settings (see attachment). Then, use that ID as the Parent ID of your accordion items (see attachment). The Parent ID was replaced by the Link Items option in Cornerstone.
For more details, please see http://demo.theme.co/integrity-1/shortcodes/accordion/
Hope that helps. 🙂
August 23, 2016 at 8:01 am #1143000
johnmilnesParticipantThanks Nabeel, that works perfectly. I’m very happy now 🙂
Have a great day!
August 23, 2016 at 10:35 am #1143244
RahulModeratorGlad we could help you.
If you still have any queries, let us know. We’d be happy to assist you with everything.
Thanks for using the X theme.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1141062 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
