WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
Expanding a child doesn't expand its parent (5 posts)

  1. m1773n5
    Member
    Posted 1 year ago #

    Hi there, and thanks so much for an awesome plugin!

    First of all, to demonstrate my issue I made both a typical shortcode example, and a roll-your-own example:
    Typical Shortcode Example
    Roll-your-Own Example
    (hosted locally, I hope it's stable!)

    Ok, here goes: I'm trying to make expandable sections of a document, and expandable sub-sections inside them. Using the [expandsub] shortcode (or simply nesting div's for the roll-your-own example), worked perfectly.
    However, I'm now trying to make a Table Of Contents, with sections and sub-sections, using links with class="extra[n]-targetname".
    While this works perfectly for "root-level" sections, it's more problematic for nested elements: the nested element expands, but its parent doesn't, which means it stays invisible.
    Is there any way to make the parent expand when the child is expanded?

    I tried several things so far:

    • Using <span class="collapseomatic" id="extra1-my_id"></span>: as stated above, expands child but not parent
    • Using <a href=#my_id" class="expandanchor></a>. While this works ,it introduces a number of issues:
      • no collapse possible (see both examples)
      • the findme attribute becomes unstable (see shortcode example)
      • if using highlander groups, clicking the link the first time opens parent, and you have to click a second time to get to the child (see roll-your-own example)

    Also, here are links to the code I used for both pages:
    Source for Shortcode Example
    Source for Roll-your-Own Example

    After thoroughly reading the documentation and browsing the forum, I have yet to find an answer to this problem! I hope someone can get me out of this pickle =)

    Cheers!

    Mittens

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    We'll look into this and get back to you in the next day.

  3. m1773n5
    Member
    Posted 1 year ago #

    Thank you so much, you're awesome =)

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    It's been a bit busy... just a note to let you know are have not forgotten... we'll get back to you soon as we can.

  5. m1773n5
    Member
    Posted 1 year ago #

    Hey thanks for thinking 'bout me! Of course, I'll just work on some other stuff, take your time ^^

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic