There are times when it would be nice to turn ANY element into an external print trigger. This is a feature often asked for when trying to hook up a Visual Editor button to be a print trigger. As of Print-Pro-Matic v 1.1.4e we have added:
new printme_trigger class that turns anything into a print trigger
new external_trigger shortcode element to enter the id or ids of the element(s) that should be used as an external trigger
And this is how it works:
First we need an element that has a unique id. There must also be the ability to add the printme_trigger class to it.
And that’s it! Note: The external_trigger attribute can accept a comma separated list of multiple id’s. Also: When an external_trigger attribute is assigned, no standard print-pro-matic icon or text will be displayed, as the external trigger will be used instead.
There are times when it would be nice to turn ANY element into an external trigger for a collapse element. So as of Collapse-Pro-Matic v 1.2.9f we have added:
new colomat_trigger class that turns anything into a trigger
new external_trigger shortcode element to enter the ids of the elements that should be used as an external trigger
new data-external-element attribute that can be used for roll-your-own collapse elements
new colomat_expand_only class that prevents the external trigger from collapsing the target, only expand
new colomat_collapse_only class that prevents the external trigger from expanding the target, only collapse
And this is how it works:
take any element, make sure it has a unique id and the colomat_trigger class assigned.
Next, assign the ID of the external id (or multiple ids) using the external_trigger attribute:
[expand title="Who has the funk?" external_trigger="funkmaster flash"]You got the funk![/expand]
Who has the funk?
Glory be, baby, you got the funk!
Collapse-Pro-Matic Class Triggers
As of version 1.3.2 of Collapse-Pro-Matic an external trigger can also be assigned to any element using only class names. For example, using a WordPress menu element, where only the classes can be assigned. The following classes must be added to the trigger:
collapseomatic
noarrow
colomatclasstrigger
colomatid-[the_target_id]
[expand title="This is the Master Trigger" id="multi-trigger"]
This is the Master Trigger
This is some text that when you click on the trigger you are able to read with your eyes. Well, your eyes are able to see the text, but I guess it’s actually your brain that reads the words and makes sense of them. But jokes on you! There is no sense to be made from these words because they are just pure jibber-jabber.
Links
The following is a link that has an href attribute of “#multi-trigger” and a class of “expandanchor”. Clicking this will scroll-to and expand-only the element.
<a class="expandanchor" href="#multi-trigger">Anchor Link to Multi-Trigger%lt;/a>
Each button needs to correspond to a target. Normally to create the target it would be part of the trigger but we add the narrow and hidden classes using the trigclass attribute and remove the target padding using the targclass attribute like so: