Nested Content Toggle
-
I am using Content Toggle for FAQ’s and that part works fine. However, I wanted to put “References” at the bottom of the first panel and not display the actual references until someone clicks on “References.” Theoretically, if I inserted a Content Toggle box inside the first FAQ, I could get exactly what I want.
I have all panels closed by default when the page first loads and that’s working fine. The problem is that the “References” Content Toggle is ALWAYS open as soon as its parent’s FAQ is open after the page first loads. If I click on it to close it, it works fine. If I click the parent closed after I click “References” to close and then reopen the parent, “References” is still closed, which is perfect.
I have the settings on the child set to “Collapsed” and “Collapse on Mobile.” For the parent, “Collapsed” is also set but “Collapse on Mobile” is not.
When I inspect the HTML, the div attributes for the child for data-mobilecollapse and data-desktopcollapse are both set to “true”, yet the panel is showing. The div tag around the panel does not have the “ub-hide” class until I close it manually. In fact, it doesn’t have “ub-hide” on it when the page first loads either, even though the parent panel DOES have the “ub-hide” class initially. I think if “ub-hide” were added to the child when the page loaded, everything would work perfectly.
I could fix this with my own JavaScript but if you’d like to fix it, I would be most grateful!
The page I need help with: [log in to see the link]
- The topic ‘Nested Content Toggle’ is closed to new replies.