How To Set The Toggle Or Accordion Module Default State Open Or Closed

Поділитися
Вставка
  • Опубліковано 31 січ 2022
  • In this tutorial I will show you how to set the default state of the Divi Accordion module open or closed when the page loads.
    Blog Post + Snippet: www.peeayecreative.com/how-to...
    In this guide, I am going to talk about how you can open or close all toggles and accordions on page load. When it comes to the Toggle Module, you can set whether to expand/close it by going to the toggle module settings. But for the Accordion, you do not have any option by default to open/close all the accordions, so for that you will learn how you can do that with the help of jQuery Snippet. In this tutorial, I will show you how to set the default state of the Divi Accordion module to open or closed using jQuery.
    Become a member of our Divi Adventure Club!
    www.peeayecreative.com/produc...
    Join The Divi Teacher Facebook group: / thediviteacher
    Visit our Divi child themes, plugins, tutorials, and courses here: www.peeayecreative.com/
    Thanks for watching!

КОМЕНТАРІ • 58

  • @arvekern7973
    @arvekern7973 Рік тому +2

    Ah - Thanx! I'm so happy there is smart people like you out there! :-)

    • @PeeAyeCreative
      @PeeAyeCreative  Рік тому

      You're welcome, glad you are enjoying the resources!

  • @MikikoMurdoch
    @MikikoMurdoch 9 місяців тому +1

    Thank you so much for this tutorial! Now I can use Divi accordions without feeling awkward.

  • @user-bv7nm7re8e
    @user-bv7nm7re8e 11 місяців тому +1

    I learned a new thing whenever i watch your video

  • @THAIWAK
    @THAIWAK 2 роки тому +2

    Great Video. Fixed that annoying Divi feature. Many thanks for posting.

  • @Chris.Mechanic
    @Chris.Mechanic Рік тому +2

    Perfect! That what I was looking for! Great work and nice way to teach! Thank you!

  • @prabinm4692
    @prabinm4692 Рік тому +1

    Thank you for the lesson... Looking for more.

    • @PeeAyeCreative
      @PeeAyeCreative  Рік тому

      Glad you like it, we have hundreds more and a new one each week!

  • @joeburnsvideo
    @joeburnsvideo 2 роки тому +1

    Thanks Nelson ..great tip

  • @user-wi9kh4mu7z
    @user-wi9kh4mu7z Рік тому +1

    Nice one. So simple

  • @aurorebarthe1850
    @aurorebarthe1850 Рік тому +2

    Parfait et simple ! Merci

  • @tammycoin
    @tammycoin 5 місяців тому

    Hi! I just found you today and you have helped me with two things, immediately. THANK YOU! QUESTION: Right before this video, I followed your video on moving the icon to the left. How do I add the CSS Class: pa-accordion, when I already have pa-accordion-icon-left?

    • @PeeAyeCreative
      @PeeAyeCreative  5 місяців тому

      You can have as many classes as you want just separate them by a space.

    • @tammycoin
      @tammycoin 5 місяців тому

      @@PeeAyeCreative Thank you. I tried that. I also tried a comma and it doesn't seem to be working. I did the "move to the left" first and I added the code to the module. I did the "close" second and I added the code to the head (as you suggested in the video). I'm wondering if that could be the issue?

    • @tammycoin
      @tammycoin 5 місяців тому

      Hi...I'm still trying to figure this out. So, I decided to create a new accordion without the (move icon to the left) and just start with this one. It's not working for me. I followed the tutorial multiple times. Not sure what I could be doing wrong. Any thougts?

  • @abirsonet925
    @abirsonet925 Рік тому +1

    Informative video

  • @RikGierman
    @RikGierman 6 місяців тому

    Dumb question, could i use the accordion hiding a galery module inside a tab
    Say i have a tab named Phase 1 and i want to show the movie posters inside that tab is that possible in some way?
    - say with shortcode or some kind of embed way?

  • @daredreamDC
    @daredreamDC 2 місяці тому

    Thanks for creating the tutorial. I'd love the title area to be expanded to accommodate a few lines of text. Is that possible?

    • @PeeAyeCreative
      @PeeAyeCreative  2 місяці тому +1

      Sure, we have lots of related tutorials on our blog and channel. Here is is: www.peeayecreative.com/how-to-add-a-second-line-of-subtitle-text-to-divi-toggle-and-accordion-modules/

    • @daredreamDC
      @daredreamDC 2 місяці тому

      Thank you!

  • @NicoleRoland-us7hs
    @NicoleRoland-us7hs Рік тому +1

    Great video - just helped me out so much!

  • @karrieredesign123
    @karrieredesign123 2 роки тому +1

    It worked - awseome tutorial thanks so much @Pee-Aye Creative

  • @versatilegirl05
    @versatilegirl05 Рік тому

    How to change the product tabs in woocommerce to accordion and vertically?

    • @PeeAyeCreative
      @PeeAyeCreative  Рік тому

      I don't think that is what this tutorial is about.

  • @christeltorsen3250
    @christeltorsen3250 2 роки тому

    Hi Nelson,
    Thank you for this post :-) It worked! However, wenn I switch on my visual builder, the first post is open. Is it possible that, even wenn I am working in my visual builder, the first post is closed to?
    Greetings, Christel Torsen (from the Netherlands)

    • @PeeAyeCreative
      @PeeAyeCreative  2 роки тому +1

      No, anything like this with jQuery will not work in the Visual Builder.

  • @leomarkconstantino4451
    @leomarkconstantino4451 Рік тому

    How to close the nested accordion the inside accordion is always on upon you open te first layer of the accordion. How can I close the accordion the inner accordion?

  • @christeltorsen3250
    @christeltorsen3250 2 роки тому

    Hi Nelson, one more question about the Toggle module :-) Wenn I am at the Toggle module and open the builder than you can set the state on OPEN or CLOSED. But, there is no responsive icon at STATE. I want the Toggle module to be open in the desktop version en to be closed on the mobile version. So, I do now have your plugin Divi Helper ( nice!) and I wonder if its possible to do it with the Divi Helper Plugin. So I hope you can give me an answer :-) Thanks Nelson! Best Regards Christel from the Netherlands.

    • @PeeAyeCreative
      @PeeAyeCreative  2 роки тому

      Hi Christel, no there no way to do that with our tutorial without further customization.

    • @billysmith1993
      @billysmith1993 Рік тому

      @@PeeAyeCreative Oh, that is too bad, I was really hoping you would have it! Found Stackoverflow thread about it, but it didnt work for me unfortunately. in any case, thank you for the above tutorial, Nelson!! Always appreciated!!

  • @kikru2930
    @kikru2930 2 роки тому

    Is there a way to make the accordion smoother? Mine isn't working smoothly.

    • @PeeAyeCreative
      @PeeAyeCreative  2 роки тому

      I'm not sure what you mean, we are enor adjusting that, it is a Divi default coded animation and very difficult to change.

  • @melissagreen2051
    @melissagreen2051 2 роки тому

    When you click on a toggle using an accordion, is there a way to collapse the questions once opened? The only way the toggle closes right now is if you click on the next toggle.

    • @PeeAyeCreative
      @PeeAyeCreative  2 роки тому

      Correct, that's just how an Accordion works by definition. Otherwise you should use Toggles.

  • @elementorpro5659
    @elementorpro5659 2 роки тому

    can we close it when we open it :)) . I mean when I open the first I need to open the second one then I can see the first one is close. Is there any solution to open the first one then click on that and close it?

    • @PeeAyeCreative
      @PeeAyeCreative  2 роки тому

      By default that way an accordion works is by clicking on another one to open and close. What you described could be achieved with multiple toggle modules instead.

  • @adambeltran7521
    @adambeltran7521 2 роки тому

    Is there a way to have all accordion slides open and not able to close?

    • @PeeAyeCreative
      @PeeAyeCreative  2 роки тому

      Not in this tutorial. Might be confusing and mean an accordion is not the right choice

  • @PrimaEinkauf
    @PrimaEinkauf 6 місяців тому

    😀

  • @beejereeno2
    @beejereeno2 11 місяців тому

    Did not work for me, unfortunately. I followed the directions and there's no "state" option in the Divi > Accordion module setting afterward.

  • @trafferz
    @trafferz 8 місяців тому

    Hmmm, nope. Still open. Has the code changed?

  • @paulright
    @paulright 4 місяці тому

    Doesn't work(

    • @PeeAyeCreative
      @PeeAyeCreative  4 місяці тому

      Hello, our tutorial does work, so if there is any issue on your site please share the details on the blog post.