Tagged: x
-
AuthorPosts
-
January 30, 2017 at 3:34 am #1350450
jsguzmanbParticipantHi
I have seen somse topics about closing and opening accordions with additional buttons, but haven´t been able to do the following
1. I have three separate accordions, one in each column
I want to close the other two (if they are open), when I open the current one. This for all three.
2. Also, I have a one-page navigation set up. One of the section consists of three subsequent accordions. When I click a menu item it scrolls down to the accordion, but I want to open it on that same click.
Thx in advance!
January 30, 2017 at 3:35 am #1350451
jsguzmanbParticipantThis reply has been marked as private.January 30, 2017 at 10:08 am #1350942
Nabeel AModeratorHi there,
Thanks for writing in!
1. Sounds like you have not grouped the accordions. To do that, simply enable the Link Items option (see attachment).
2. Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding. Take care!
January 30, 2017 at 6:59 pm #1351634
jsguzmanbParticipantHi
Thx for the help!
But this link is for items of the same accordion, not different accordion elemnts, is it?
Thx!
January 31, 2017 at 3:46 am #1352013
LelyModeratorHi There,
Please try adding this custom code on Appearance > Customize > Custom > Edit Global Javascript:
jQuery( function( $ ) { $( document ).ready ( function() { $('.x-accordion .x-accordion-heading>a').click(function(){ var obj = $('.x-accordion .x-accordion-body'); $.each( obj, function() { if($( this ).hasClass('in')){ $( this ).removeClass('in'); } }); }); }); });Something like this:http://screencast-o-matic.com/watch/cbVwQmQ920
Hope this helps.
February 2, 2017 at 3:29 am #1354956
jsguzmanbParticipantThat did the trick.
Excellent and quick response as always.
Thank you very much!
February 2, 2017 at 3:54 am #1354987
jsguzmanbParticipantOne last question. I know it`s a longshot
Is there a way to close the current accordion second click?
That is, I click the title or the arrow and it opens, and if I click again the same title, it kind of closes but opens again inmediately.
You can see it more clearly here
http://memorytellers.com/empresas/#x-section-2
Thx!
February 2, 2017 at 7:32 am #1355171
JoaoModeratorHey there,
Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1350450 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
