• Resolved mikemacd

    (@mikemacd)


    Hi

    I’d like to use Collapse-O-Matic ‘roll-your-own’ elements with images as triggers and would like to use two options with these images which only appear to work with the [expand] approach.

    The first is the special class ‘must-be-one’.
    The second one is the expanded attribute (‘expanded=”true”) which there seems no way of invoking in the roll-your-own format.

    I’ve set up a temporary page showing some icons which, when clicked, reveal information.

    We need to have the first item open (expanded) when the page loads. Then there must always be one visible as visitors click around. Is there perhaps a way to do this that I have missed seeing in the documentation?

    The icons are in a horizontal list, each coded like this:

    <li class="collapseomatic noarrow" id="sdg-01" rel="sdgicons-highlander"><img class="icon" src="..xxx.png"></li>

    The target divs are coded like this:

    <div class="collapseomatic_content" id="target-sdg-01" targclass="must-be-one">
    <img src="..xxx.png">
    
    Some text ...
    
    </div>

    I would appreciate your help if there is a solution. I have more applications for this if it can work.

    Thanks,
    Mike

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mikemacd

    (@mikemacd)

    I found that ‘must-be-one’ works when added to ‘class’ in the trigger statement.

    I showed it incorrectly above as a targclass item in the content statement.

    All I need now is a method of opening the page with one of the items expanded.

    Thanks,
    Mike

    Plugin Author twinpictures

    (@twinpictures)

    To have a roll-your-own expand element display expanded by default, simply add a class of colomat-close to the trigger.

    Thread Starter mikemacd

    (@mikemacd)

    Wonderful – it works perfectly. Thank you!

    This is such a great plugin.

    Sorry for the slow reply. I missed seeing the notification email until now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need ‘must-be-one’ and expanded=”true” on roll-your-own image trigger’ is closed to new replies.