Collapse-O-Matic ID Tag In Link

A quick example of how to link to—and autoexpand—a collapse-o-matic element on the same page. Key: Assign the link a class of expandanchor like so:

[expand title="question 1" id="q1"]answer 1[/expand]
[expand title="question 2" id="q2"]answer 2[/expand]
[expand title="question 3" id="q3"]answer 3[/expand]
<a class="expandanchor" href="#q1">question 1</a>
<a class="expandanchor" href="#q2" rel="m_PageScroll2id">question 2</a>
<a href="#q3">question 1</a>
question 1
answer 1
question 2
answer 2
question 3
answer 3
question 1
question 2 (page scroll 2 id)
question 3 (no expandanchor class)

4 Replies to “Collapse-O-Matic ID Tag In Link”

  1. Hey

    What about showing an example such as:

    A list of somethings.
    Something 1
    Something 2
    Something 3
    Something 4

    — Click any of the Somethings above and have the following somethings open.
    When Something 1,2 ,3 or 4 is clicked information is opened below – another place on the page/post. Nicely and cleanly. O hei Baden. I am creating a page such as this but for a film club web site in Norway. I will have a list on the left of the page saying read about the movie. One clicks and info about the movie is seen on the right of the page. Then one can continue clicking see trailer – trailer opens to the right of the page. Then one clicks the next thing in the list and it opens on the right….

    Have a great day!

    Btw
    My tutorial from 2013. Showing how I at the time used it to create a list of elements open one after the other below each other simpler then the list I mentioned above.
    http://easywebdesigntutorials.com/accordion-plugin-collapse-o-matic/

  2. Useful tool! Quick question, however: whenever I make a link to an id tag (in another page, but I don’t think this changes much), the link works properly but the page keeps scrolling down by about 2 centimeters. The “rel=”m_PageScroll2id”” changes nothing. Any ideas?

Comments are closed.