Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #514117

    Hi Guys!

    I tried the CSS in the link at https://kriesi.at/support/topic/accordion-all-toggles-open/. That worked to expand everything when the page was loaded. HOWEVER it prevented anything from collapsing when a toggler was clicked. I’m working on a restaurant menu and would like to have it all expanded initially. I’d also like to give users the option to Expand All, Collapse All, as well as expand/collapse each section individually. Can all that be done with CSS, or will some jQuery be required???

    Thanks!

    Scott

    #514514

    Hi scotthco!

    It would require some javascripting. I would consider creating a feature request here, https://kriesi.at/support/enfold-feature-requests/, and if it gets enough interest then we may see some options / buttons get added for this.

    Other than that you could try a WordPress toggle plugin out to see if they have this feature included.

    Cheers!
    Elliott

    #514874

    Hi Elliott!

    Thanks for the reply. So how do you guys do it now, with jQuery? Could you point me toward the current code? Perhaps I could tweak it? I know I’d need to find a way to make the tweaks persist through theme updates, but I’m pretty good at stuff like that.

    Thanks!

    Scott

    #515363

    Hi!

    You can find it around line 2434 in the /enfold/js/shortcodes.js file.

    Best regards,
    Elliott

    #521282

    I discovered that turning on the accordion’s sort functionality plus using the CSS to display all toggles initially open makes it behave nearly perfect. One thing though: Is there any way to use the sort items but not actually have them sorted? In other words can they be displayed in the order that the toggle items appear? I can do that now, but I have to precede the toggle sort tag’s text with a number. The client probably could live with that, but if there’s a way to display that list without it being put into alphabetical order, that would be ideal.

    Thanks!

    Scott

    #521343

    Hi!

    May we have a link to the page in question so we can take a closer look?

    Best regards,
    Dake

    #522120

    Sure, here’s the direct URL. It’s on my development box right now, so I’m putting it in the private content section.

    #523075

    Hey!

    Not sure if it will work but you can try commenting out line 262 in the /enfold/config-templatebuilder/avia-shortcodes/toggles.php file.

    //ksort(avia_sc_toggle::$tags);
    

    Best regards,
    Elliott

    #523321

    That works, thank Elliott!

    Is there a way I can do that override in my child theme so it won’t get over written by Enfold theme updates? I can’t just plop that whole sort_list function right into my child theme’s functions.php, can I?

    Thanks again!

    Scott

    • This reply was modified 8 years, 9 months ago by scotthco.
    #525069

    Hey!

    You can do this, https://kriesi.at/support/topic/is-it-possible-to-modify-files-in-enfold-child/#post-218226, to edit shortcodes in a child theme.

    Best regards,
    Elliott

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.