• Resolved CliffHobbs

    (@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,
    Cliff

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter CliffHobbs

    (@cliffhobbs)

    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:

    http://www.faqshop.com/wp/blogs

    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

    (@baden03)

    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: http://www.faqshop.com/wp/acctest 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: http://www.faqshop.com/wp/acctest/#johnny5
    and BAM, you’re golden.

    Thread Starter CliffHobbs

    (@cliffhobbs)

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

    If you goto here:

    http://www.faqshop.com/wp/blogs

    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 😉

    http://www.faqshop.com/wp/acctest/#kraftwerk

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

    Thread Starter CliffHobbs

    (@cliffhobbs)

    BTW this isn’t resolved

    Plugin Author Baden

    (@baden03)

    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: http://www.faqshop.com/wp/acctest

    Thread Starter CliffHobbs

    (@cliffhobbs)

    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

    (@baden03)

    Are you by chance using a cacheing plugin? It’s working now: http://www.faqshop.com/wp/acctest#kraftwerk

    Thread Starter CliffHobbs

    (@cliffhobbs)

    Apologies <blush> my bad:

    Yours:

    http://www.faqshop.com/wp/acctest#kraftwerk

    What I had:

    http://www.faqshop.com/wp/acctest/#kraftwerk

    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.