[Plugin: jQuery Collapse-O-Matic] Include auto expand in hyperlink
-
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,
Cliffhttp://wordpress.org/extend/plugins/jquery-collapse-o-matic/
-
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.
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.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.
BTW this isn’t resolved
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/acctestHere 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]
Are you by chance using a cacheing plugin? It’s working now: http://www.faqshop.com/wp/acctest#kraftwerk
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.
- The topic ‘[Plugin: jQuery Collapse-O-Matic] Include auto expand in hyperlink’ is closed to new replies.