Support » Plugin: Collapse-O-Matic » [Plugin: jQuery Collapse-O-Matic] Include auto expand in hyperlink

  • Resolved CliffHobbs


    So I’m LOVING the fact I can assign a name to my various expand items on a page and then hyperlink to that particular one (good taste in Star Wars and Kraftwerk btw 😉

    Is there anyway that as part of the hyperlink I can include the command to expand the item?

    So I blog about a new article on my site and rather than relying on the user to click the title to expand it when they click the hyperlink and arrive on the page, the link takes them to page and auto-expands the item (hope this makes sense)?

    Many thanks,

Viewing 8 replies - 1 through 8 (of 8 total)
  • OK I’ve re-read the docs which state:

    When the optional ID attribute is defined, the id value can be used as a URL anchor to automatically expand the content:

    However, this isn’t working for me. I’ve created a new page and hyperlinked from it from here:

    The right page loads but the item doesn’t auto expand like it should 🙁

    Appreciate any help you can offer to get this working.

    Plugin Author Baden


    To auto-expand via url, you need two things. A specific ID, and the id as anchor text in your URL. So, in your example you start out with the base URL: and have, say Johny 5 Alive auto expand (loved that move as a kid… I still say :’People at night are liking lights’ in an Indian accent) you would first need to assign the id:

    [expand id="johnny5" title="Johnny 5 Alive"]Who's Johnny, she said<br/>And smiled in her special way[/expand]

    Then, all you need to do is tack a /# and your id (johnny5 in this case) to the end of your url like so:
    and BAM, you’re golden.

    Thanks for the reply but feeling like my Mumma is a Snow Blower 🙁

    If you goto here:

    Then click “This is a test” hyperlink in the “Test” post which links to the following page using your “kraftwerk” tag (I like to keep things simple when I start out with something new 😉

    The page loads but doesn’t expand the Pocket Calculator item – It’s like everything is happening in reverse.

    BTW this isn’t resolved

    Plugin Author Baden


    So in your example, which collapse element did you assign the kraftwerk id? Looking at your source, ‘kraftwerk’ is not assigned anywhere.
    In the intrest of keeping things simple, please post the exact shortcode you are using for ‘Pocket Calculator’ on this page:

    Here we code apologies if I’ve messed something up:

    [expand title="Pocket Calculator" tag="h4" id="kraftwerk"]
    over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
    The quick brown fox jumped over the lazy dog.
    Target Content[/expand]
    Plugin Author Baden


    Are you by chance using a cacheing plugin? It’s working now:

    Apologies <blush> my bad:


    What I had:

    Extra “/” before the #

    Sorry, please close this.

    Just the “jumping pages” problem to fix (my other thread I know you’re looking at thank you) and all is good with the World.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: jQuery Collapse-O-Matic] Include auto expand in hyperlink’ is closed to new replies.