Collapse-Pro-Matic New Slide Effect: Toggle

This is a test of the new slide effect for that has been added to Collapse-Pro-Matic version 1.1.6.

For this to work on ALL expand elements, simply set the Animation Effect to Directional Slide in Collapse-Pro-Matic options page. To set only a single expand element using the shortcode, the animation_effect attribute set to ‘toggle’:

[expand title="Trigger" animation_effect="toggle" direction="left"]Target Content[/expand]
Trigger
Target Content

To best appreciate how this effect works, it would be best to create a target with a fixed width and height. Using the roll-your-own method the attributes are assigned using data-* format. Here is an example that wraps a fixed size target element in a slightly larger container:

<div class="collapseomatic" id="hortest" title="Trigger" data-animation-effect="toggle" data-direction="left">Trigger One</div>
<div style="width: 400px; height: 400px; border: 1px dotted #ccc;">
<div id="target-hortest" class="collapseomatic_content" style="width: 300px; Height: 300px; background: #ccc;">Target Content</div>
</div>
Trigger One
This is the target content div that is linked to the trigger one above. It is wrapped in a div so that there is no change to the vertical size of the page when it slides on and off.
Trigger Two
This example has no wrapping div, lets see what happens to the vertical scroll of the page when it slides on and off page.

Collapse-Pro-Mtic 1.1.6 includes three new attributes that override the global default settings, allowing single expand elements to have there own animation-effect, distance and direction attributes. Using the roll-your-own method they defined using the data-* attribute like so:

<div class="collapseomatic" id="hortesthree" title="Trigger" data-animation-effect="toggle" data-direction="right">Trigger Three</div>
Trigger Three
This example should slide in from the right
Trigger Four
This example should slide both… whatever that is

Collapse-O-Matic ImageMap Test

Anne asks: Is there a way to use this plugin with image maps?

And by ‘this plugin’ she means Collapse-O-Matic. Well, Anne, that’s a good question! Let’s see what we can figure out here. First we need an image with an image map. We’ll pick something easy… like this:

pie_chart_500

Pie I have not yet eaten
The pie is a lie

Now clearly we will need to use the roll-your-own method to assign the triggers and target elements. So each of the image map area elements will need the collapseomatic class assigned. And since we do not want arrows assigned, we will also give each area element the class of noarrow.

<area id="noteaten" class="collapseomatic noarrow" shape="poly" coords="x, y, z, n" />

Now we just need to add in our target elements:

<div id="target-noteaten" class="collapseomatic_content ">Target Content</div>