Collapse Commander expand_trig & expand_targ Test

Standard Use of Collapse Commander’s expand_trig and expand_targ shortcodes:

This is the trigger
[expand_trig cid="1537"]

I’m a little donkey

This is the target:
[expand_targ cid="1537"]

short and stout
short and stout
Stuck in a manhole cover until someone pulled me out.

Note the above Collapse-Commander expand element had a default ID assigned. Currently, if a default ID has been assigned, the ID can-not be override with a shortcode attribute. This would not work:

[expand_trig cid="1537" id="donk"]
[expand_targ cid="1537" id="donk"]

Collapse-O-Matic Tabindex Test

This is a test of a new tabindex attribute feature. Assigning the tabindex attribute a numerical value will set the tabindex attribute for the trigger. We are going to use the number three, because we really like this number.

Now what this will do is assign a tabindex of three to the trigger so you should now be able to hit the tab button and eventually land on the trigger. Something to note:

In HTML5, the tabindex attribute can be used on any HTML element (it will validate on any HTML element. However, it is not necessarily useful).

In HTML 4.01, the tabindex attribute can be used with: <a>, <area>, <button>, <input>, <object>, <select> and <textarea>.

So, with that in mind:

HTML 4.01

[expand title="Trigger Text" tag="a" tabindex="3"]Target Content[/expand]
When this item is tabbed to, it will be clearly displayed as in-focus due to a nice little frame or border around the element.
Trigger Text

Target Content

HTML 5

[expand title="Trigger Text" tabindex="3"]Target Content[/expand]
Although this item has the same tabindex value as above, since it is using the default tag of DIV it will NOT be visibly shown as in-focus with a frame.

Trigger Text
Target Content

To display a visible change when our item is in focus, simply create a class for the trigger (using trigclass) and define the :focus pseudo class with an outline like so:

CSS
.lookatme:focus {
outline: #ccc dotted 2px;
}

[expand title="Trigger Text" tabindex="3" trigclass="lookatme"]Target Content[/expand]

Trigger Text
Target Content

Now here is a fun fact:
tabindex="0" allows the element to be placed in the default navigation order.
[expand title="Trigger Text" tabindex="0" trigclass="lookatme"]Target Content[/expand]

Trigger Text
Target Content

Collapse-O/Pro-Matic CSS Tricks – Arrows

Change Open Close Arrows

First create and upload two images. One image for the collapsed state, one for the expand state.
In this example we are using the following images:
Collapsed Icon Expanded Icon

Next we want to create a new class for these arrows. We are going to use the name greenballs. The class definitions need look like so:

CSS

.collapseomatic.greenballs {
background-image: url(full_url_to_collapsed_icon.png);
}
.colomat-close.greenballs {
background-image: url(full_url_to_expanded_icon.png);
}

Now we need to assign the trigclass attribute our value of ‘greenballs’

[expand title="Trigger Text" trigclass="greenballs"]Target Content[/expand]
This will produce the following:
collapse-o-matic_collapse_01 collapse-o-matic_expand_01

Now we need to adjust the padding so that the left side of the trigger text is not so smashed-up against the icons. To adjust the vertical centring we need to adjust background-position of the background url as well. Here is how the CSS will look after we make these changes:

CSS

.collapseomatic.greenballs {
background-image: url(full_url_to_collapsed_icon.png);
background-position: left center;
padding-left: 35px;
}

Looking much better now:

collapse-o-matic_collapse_02 collapse-o-matic_expand_02

Now If we have a list of expand elements, it might be nice to have a little border that separates each element. Also a bit more vertical padding between the elements:

CSS

.collapseomatic.greenballs {
background-image: url(https://spacedonkey.de/wp-content/uploads/2014/12/circle_plus.png);
background-position: left center;
padding-left: 35px;
padding-top: 15px;
border-bottom: 1px dotted #dfdfdf;
}

Almost complete:

collapse_list_03

All that is left to adjust is the spacing and add bottom border to the hidden content. Add a new class for and assign it using the targclass attribute:

[expand title="Trigger One" trigclass="greenballs" targclass="gb_target"]Target Content[/expand]

CSS

.gb_target{
padding: 15px;
border-bottom: 1px dotted #dfdfdf;
}

And the Final result:

Trigger One
Target Content
Trigger Two
Target Content
Trigger Three
Target Content

Hover-O-Matic 0.4 Test

Roll-Your-Own Method:

Trigger

1. has class: collapseomatic
2. has an id, example: ape

Target

1. has class: collapseomatic_content
2. has id in the format target-trigger_id, example: target-ape

Internal Close Triger

1. has class: colomat-internalclose
2. has id in the format bot-trigger_id, example: bot-ape

Live Demo

ape mule

this is some lovely hidden ape content
internal close
this is some lovely hidden mule content. And here is a link to close the content.