-
AuthorPosts
-
October 6, 2015 at 4:33 am #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
October 6, 2015 at 4:17 pm #514514Hi 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!
ElliottOctober 7, 2015 at 2:05 am #514874Hi 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
October 7, 2015 at 4:53 pm #515363Hi!
You can find it around line 2434 in the /enfold/js/shortcodes.js file.
Best regards,
ElliottOctober 20, 2015 at 1:00 am #521282I 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
October 20, 2015 at 4:55 am #521343Hi!
May we have a link to the page in question so we can take a closer look?
Best regards,
DakeOctober 21, 2015 at 4:35 am #522120Sure, here’s the direct URL. It’s on my development box right now, so I’m putting it in the private content section.
October 22, 2015 at 4:11 pm #523075Hey!
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,
ElliottOctober 22, 2015 at 10:33 pm #523321That 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 9 years, 1 month ago by scotthco.
October 26, 2015 at 5:25 pm #525069Hey!
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 -
AuthorPosts
- You must be logged in to reply to this topic.