Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1350450
    jsguzmanb
    Participant

    Hi

    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!

    http://guillermotrujilloaccini.com/memorytellers/

    #1350451
    jsguzmanb
    Participant
    This reply has been marked as private.
    #1350942
    Nabeel A
    Moderator

    Hi 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!

    #1351634
    jsguzmanb
    Participant

    Hi

    Thx for the help!

    But this link is for items of the same accordion, not different accordion elemnts, is it?

    Thx!

    #1352013
    Lely
    Moderator

    Hi 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.

    #1354956
    jsguzmanb
    Participant

    That did the trick.

    Excellent and quick response as always.

    Thank you very much!

    #1354987
    jsguzmanb
    Participant

    One 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!

    #1355171
    Joao
    Moderator

    Hey 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!

  • <script> jQuery(function($){ $("#no-reply-1350450 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>