Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #306394

    Jallal
    Participant

    Hey folks! I’ve spent the past hour & a half troubleshooting why our accordions won’t collapse & I’ve not gotten any closer to a resolution, unfortunately. We’re completely up to date, I don’t have any errors showing on the console.
    Here’s my code:

    
    [accordion id="branding"]
    [accordion_item title="title" parent_id="branding"]
    
    text
    
    [/accordion_item]
    [accordion_item title="title2" parent_id="branding"]
    
    text
    
    [/accordion_item]
    [accordion_item title="title3" parent_id="branding"]
    
    text
    
    [/accordion_item]
    [accordion_item title="title4" parent_id="branding"]
    
    text
    [/accordion_item]
    
    [/accordion]
    #306688

    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #307257

    Jallal
    Participant
    #307631

    Rue Nel
    Moderator

    Hello There,

    Please check your page. Upon further investigation, you have added some customizations that broke your site. You were trying to add a Google font in your site, http://prntscr.com/7j3557 and it is placed at the wrong spot. In your contents, there were unclosed html tags present. All these errors can lead the accordion not to function. We do recommend that you use a page builder to avoid any invalid html tags inside your page. Keep in mind that if one single character missed in the code may break your site or creates issues with other elements in your page.

    If nothing else works, would you please provide us the url and access information of your site so we can take a closer look. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – Link to your site

    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #309647

    Jallal
    Participant
    This reply has been marked as private.
    #309829

    Friech
    Moderator

    Hi There,

    Thanks for the login. I’ve check the page you provided above and accordions are collapsing. Please confirm.

    http://screencast.com/t/ZfZWAIAu0S

    Thanks!

    #309838

    Jallal
    Participant

    Hello! I’m sorry, I guess I wasn’t clear. The issue wasn’t that they won’t collapse at all, but the feature where only one accordion item at a time remaining open is not functioning, which is what we were after.

    Thoughts?

    #309975

    Lely
    Moderator

    Hello Jallal,

    There’s a javascript error. This might be the cause. Please check this part of the code:
    ga(‘set’, ‘&uid’, {{USER_ID}});
    Replace it with:
    ga('set', '&uid', {{USER_ID}});

    This is different from '

    Let us know how this goes.

    #309983

    Jallal
    Participant
    This reply has been marked as private.
    #310129

    Christopher
    Moderator

    Hi there,

    The error is still there.
    You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    Let us know how it goes.

    #317220

    Jallal
    Participant

    Hi folks! The error is removed, all plugins have been tested, the issue remains.

    #317366

    Nabeel A
    Moderator

    Hi again,

    Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Javascript

    jQuery(document).ready(function($) {
       $('.x-accordion-toggle[data-parent]').click(function() {
        var $this = $(this);
        var accordion = $this.closest('.x-accordion');
    
        accordion.find('.x-accordion-toggle:not(.collapsed)').addClass('collapsed');
        accordion.find('.accordion-body.collapse.in').removeClass('in');
    
        if(!$this.hasClass('collapsed')) {
          $this.addClass('collapsed');
        }
        $this.parent('.x-accordion-heading').siblings('.accordion-body.in').removeClass('in');
      });
    });

    Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

    #317444

    Jallal
    Participant

    That’s done it – thanks, folks! We’ll be back for some more licenses, soon.

    #317666

    Friech
    Moderator

    We’re delighted to assist you. Cheers!