• Hi,

    Thank you for a wonderful plugin.

    I have looked at the documentation. I can get some features to work but not all.

    This is what I’m using currently:

    [expand title=”Open story” tag=”h2″ trigpos=”below” scrollonclose=”auto” swaptitle=”Close story”]Story Content[/expand]

    Here is what I’d like to achieve:
    “Open story” is clicked and the content becomes visible/expands.
    – now after expanding the title at beginning changes to “Close story”
    – have “Close story” ALSO appear at bottom
    – still have auto-scroll work when “Close story” is clicked

    Thank you so much,
    Meno

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author twinpictures

    (@twinpictures)

    Hello. Happy to help. What was your question? What is not working? Please include a link to your page.

    “Open story” is clicked and the content becomes visible/expands.

    This is the default behaviour. Is this not working?

    after expanding the title at beginning changes to “Close story”

    This what the swaptitle attribute does in your example. Is this not working?

    have “Close story” ALSO appear at bottom

    To include a like at the bottom of your collapse content you would use the internal collapse trigger as explained in the documentation.

    have auto-scroll work when “Close story” is clicked

    This is what the scrollonclose attribute does. Is this not working?

    Please let us know exactly what your issue is, what has been tried, including a link to the page you are working on.

    Thread Starter Meno

    (@menoclu)

    I don’t understand how to use ID, as in id=”r2d2wiki.

    where do I enter the content of the ID??

    Plugin Author twinpictures

    (@twinpictures)

    if you do not supply an id, one will be randomly generated.
    since you want to reference this ID using an internal collapse trigger, you will need to define one using the ID attribute.

    As the example in the documentation shows:

    [expand title="R2 may have been stolen" id="stolenr2"]
    Target Content
    <span class="collapseomatic colomat-close" id="bot-stolenr2">click here to close</span>
    [/expand]
    

    the trigger id is defined as: stolenr2
    therefore the internal collapse trigger needs to have the id of bot-<the_trigger_id>, or in this case: bot-stolenr2

    Does that clear things up a bit?

    Thread Starter Meno

    (@menoclu)

    You are very kind and patient and I know you’re yelling at the screen wondering how someone can be so stupid.

    I want to achieve the example here:
    https://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/#internal-collapse-trigger

    Where do I enter the actual content of the “stolenr2” ID?

    That is, where do I type the following:
    “I stumbled across a recording while I was cleaning him. He says that he belongs to someone named Obi-Wan Kenobi. I thought he might have meant old Ben. Do you know what he’s talking about?”

    If it’d be easier, please copy and paste for me everything that needs to be entered in the wordpress editor to achieve this:

    Thank you,
    Meno

    Plugin Author twinpictures

    (@twinpictures)

    ah so! I already did that. It’s the Target Content in the example above.
    so to put it all togher it would look like this:

    [expand title="R2 may have been stolen" ID="stolenr2"]I stumbled across a recording while I was cleaning him. He says that he belongs to someone named Obi-Wan Kenobi. I thought he might have meant old Ben. Do you know what he's talking about?
    <span class="collapseomatic colomat-close" id="bot-stolenr2">click here to close</span>[/expand]
    
    Thread Starter Meno

    (@menoclu)

    yes, it helped. thank you!

    two things:
    1. how can I stylize the bottom link, like making h3 or bold, for example?
    2. Collpasing with auto-scroll doesn’t quite move he page to the epand link. It moves to below that. did I do something wrong?
    Here’s my page.

    Thank you again,
    Meno

    • This reply was modified 7 years, 10 months ago by Meno.
    Plugin Author twinpictures

    (@twinpictures)

    Sounds like we’re almost there!

    1. like so:

    <h3 class="collapseomatic colomat-close" id="bot-stolenr2">click here to close</h3>
    

    or you can create your own CSS, give it a name (like my-funky-class) and add it like so:

    class="collapseomatic colomat-close my-funky-class"
    

    2. are you taking into consideration the admin menu-bar that shows when you are logged in? Try it while not logged in, and see if it’s right then. If not, do you have a sticky menu at the top of your page? In that case you will need to define an offset, using the offset attribute.

    Hope this gets you a bit further near your goal!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘expand at top, collapse at bottom, auto-scroll’ is closed to new replies.