This is an example of some text that has a trigger placed inline, meaning that the trigger does not break the flow of the text. However, when this triggerhidden content is clicked and the target is expanded, the target would break the paragraph as a display: block element. Naturally, when the element is collapsed, the inline flow returns.
...However, when [expand tag="span" title="this trigger" targtag="span"]hidden content[/expand] is clicked...
The Roll-Your-Own Method
This is an example of some text that has a trigger placed inline, using the roll-your-own method. However, when this trigger
is clicked and the target is expanded, the target would break the paragraph as a display: block element. Naturally, when the element is collapsed, the inline flow returns.
...However, when <span title="this trigger" class="collapseomatic" id="testme2">this trigger</span><div class="collapseomatic_content" id="target-testme2">hidden content</div>
This is an example of how a limited time offer would work in conjunction with content in a collapse-o-matic expand element.
This demo uses T(-) Countdown Control with a cookie that tracks when the offer expires for each unique visitor. Once the countdown reaches zero, T(-) Countdown Events will remove any special offer items.
For this demo, we’ll set the special timer for just two minutes. The offer will then be removed for 24 hours, and then after the 24 hours are past, the offer will reset.
this is where the details of the special are presented
Normally a countdown groups the units of time (weeks, days, hours, minutes and seconds) into a single countdown unit. But what if you wanted to break out these units and have them displayed on different parts of the page?
Step One. We will need to add a new attribute that tells the countdown NOT to display any of the digits. This way all the countdown scripts and details are still loaded, but the countdown is not displayed. Something like:
Step Two. A new shortcode will need to be created for displaying the time unit. We will need to know the countdown id (cid) the time unit to be displayed, and the style to be used, if other than the default style set up on the plugin settings. If a custom style is used it must be defined in both the countdown and the units like so:
Using the new %this year% and %this_easter% placeholders introduced with T(-) Countdown Control version 1.8.0, it’s easy to calculate holidays such as labor day like so:
Launch Strtotime: september %this_year% first monday
As of version 1.8.2, using these shortcodes will automatically recalculate for next year’s date after the holiday has past. Holidays should be set as recurring ‘Yearly’ and they will automatically be rescheduled for next year.
Other Holidays can be calculated in the same manner:
New Years: first day of january %this_year%
Martin Luther King, Jr. Day: january %this_year% third monday
President’s Day: february %this_year% third monday
Ascension Day: %this_easter% + 40 days
Pentecost: %this_easter% + 50 days
Memorial Day: last monday of may
Independence Day: july 4 %this_year%
Labor Day: september %this_year% first monday
Columbus Day: october %this_year% second monday
Veteran’s Day: november 11 %this_year%
Thanksgiving Day: november %this_year% fourth thursday
Christmas Day: december 25 %this_year%
Eight Days before Thanksgiving
november %this_year% fourth thursday + 14 hours 30 minutes – 8 days