Summary: Use divs as tooltips
Prerequisites: pmWiki-2.1.x and domTT
Questions answered by this recipe
How may I provide comfortable contextual help/information in my wiki pages?
- Fetch the domTT installation archive and extract it into your
/pub to get a
/pub/domTT directory tree available (the
/pub/domTT/examples/index.html and related pages should be browseable).
- Linked version does not work in IE 8. Download the IE8 supported version here. kaptainkory June 06, 2009, at 07:04 PM
- Download the domtt.phpΔ cookbook script, put it in your
/cookbook directory and enable it in your local customization files.
In a wiki page:
Note: Although it looks like a link, the markup only triggers popup window (for now).
Into the details
The popup markup general syntax is:
[:DIV_IDENTIFIER OPTIONS: LINK_TEXT]
- Miscellaneous parameters handled by the domTT script itself and described in the distribution at
/pub/domTT/HOWTO.html. Parameters are set as
param='value', boolean ones as
+param (true) or
- Any text that can be used in a link.
As an example, the following markup
[:tip1 +trail grid=10:Tip1]
will show the div named as 'tip1' as a popup trailing the mouse in every direction on a 10 pixel grid.
When needed, tooltip divs may also use the specific
[::LINK_TEXT] as a custom self close link.
The following variables are available to configure the recipe:
- Where to find the domTT distribution (defaults to
$DomTTPubDir = "$FarmPubDirUrl/domTT";
- Various style definition names used by the recipe (obsoletes the previously documented
These definitions may also be set as markup parameters.
class: The div tooltip style (defaults to
tooltiplink: The link style (defaults to
linkclosetooltip: The tooltip div custom self close link (defaults to
- Allow style changes via markup parameters (defaults to
- Predefined parameters (defaults to nothing).
$DomTTParams['+'] = array('trail');
$DomTTParams['fade'] = 'both';
$DomTTParams['fadeMax'] = '100';
- 2006-08-30 Initial release.
- 2006-08-31 Fixed conflicting window.onload chain call (Gemini and Fixflow skins).
- 2006-09-05 Renamed variable. Fixed script inclusion order.
- 2006-10-25 Added RecipeInfo data.
- 2006-10-26 Cleaned code.
- 2006-10-29 Added style overloading.
The recipe was enabled for this page.
A '''new''' line.
This [:message1 +trail grid=10:text will display the related division] as
This text will display the related division as a popup.
See discussion at DomTT-Talk
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.