1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Accordion is not working in mobile version

Discussion in 'Free Divi Community Forum' started by Suhaila, May 3, 2024.

  1. Suhaila

    Suhaila New Member

    Hi, I need help. My accordion is not working under mobile version. How should I go about this. I am using Divi Child theme.
     
    1. PRO MEMBER PERKS Beautifully crafted custom colored 'Industrial' Divi layout for all Pro members:View Demo
  2. Divi Booster

    Divi Booster Divi Expert

    Are you able to share a link and describe the problem (e.g. is it not opening, are the styles not how you'd expect, etc.)?
     
  3. Suhaila

    Suhaila New Member

    The link to my company website is : www.pracbiz.com

    The following solution tab 4 and 5 is not working under the mobile view.
    upload_2024-5-6_15-55-10.png

    Thank you.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade team carousel design for your Divi site without using any plugins:View Demo
  4. Divi Booster

    Divi Booster Divi Expert

    Thanks Suhaila. I can see three things that need to be changed.

    1) Your code for implementing the mobile accordion only handles the first three items:

    Code:
    Log In or Sign Up to view this code.
    Change this to also handle clicks on the 4th and 5th tabs, like so:

    Code:
    Log In or Sign Up to view this code.
    2) The section containing the "LHDN MY E-Invoice (MYEI)" tab has the wrong class. It has the class "solution-accordion-4", but it should be "solution-accordion-5".

    3) Each of the content sections, "#solution-tab-1", "#solution-tab-2", etc. also has the class "solution-accordion-4". This should be removed from them otherwise, when you implement the code change above, clicking on the content of any tab would, incorrectly, toggle the "Cross Border Payment" tab.

    Hopefully that will get the accordion working correctly!
     
  5. Suhaila

    Suhaila New Member

    Hi there, thank you for your fast reply.

    I have the following queries.

    1. How do I access coding part?
    upload_2024-5-7_9-47-39.png

    3. Should I remove class "solution-accordion-4" from "#solution-tab-1", "#solution-tab-2", etc. o should I rename it as "solution-accordion-1", "solution-accordion-2" etc?

    Thank you.
     
    1. PRO MEMBER PERKS Divi Block Pro - 30+ premade custom footer designs for you to choose from:View Demo
  6. Divi Booster

    Divi Booster Divi Expert

    Hi Suhaila,

    I can't tell for sure where the code is added, but I think you will probably find it in one of the code boxes at:

    WP Dashboard > Divi > Theme Options > Integrations

    But as it's custom code that's been added to your site, there are other places it might be, so if you don't find it there, check to see if you are using a child theme - it might be in one of its files if you are.

    If you want clicking in the content area (as well as the button) to be able to close the section then rename the classes. But otherwise delete them so that only the tab titles can be used to open / close the content.
     
  7. Suhaila

    Suhaila New Member

    1. PRO MEMBER PERKS Divi.Help Layout AI Generator - Try the power of AI to generate a custom Divi layout for you:Try Now
  8. Divi Booster

    Divi Booster Divi Expert

    Hi Suhaila,

    It looks like the class on the section for your fifth accordion is misspelled - it is currently "solution-accordian-5" (with an "a"), where it should be "solution-accordion-5" (with an "o"). I think if you correct that, it should get it working.

    Hope that helps!