From 710c48f908290c52b93e57e29741fcd0696b2d22 Mon Sep 17 00:00:00 2001 From: Thomas Keil Date: Thu, 4 Jan 2007 22:29:18 +0000 Subject: *** empty log message *** --- javascript/examples/example14.html | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 javascript/examples/example14.html (limited to 'javascript/examples/example14.html') diff --git a/javascript/examples/example14.html b/javascript/examples/example14.html new file mode 100644 index 0000000..567bda3 --- /dev/null +++ b/javascript/examples/example14.html @@ -0,0 +1,44 @@ + + + + [DOM Tooltip] Example 14: Positioning + + + + + + +
Example 14: Positioning
+
+

Here we will demonstrate fixed positioning of the tooltip relative to objects on the page. In this example, the matrix of distros is an image map which trigger tooltips to display the respective names. The two distros on the left use the "parent" option, which specifies a target area that will host the tooltip when it appears. Naturally the tooltip must be relatively positioned in this case to be taken in by its parent. The two distros on the right, however, calculate their position based on the position of the image using the domLib_getOffsets() function. It appears to be more work, but in the end, the second method offers the most flexibility.

+

+ + + + + +
+

+

* While setting up this example I realized that domTT could use more flexibility in this area.

+

** Keep in mind that because the tooltips are created using div tags, it is necessary to change the display style to 'inline' using the first technique to prevent them from displaying as fully expanded blocks.

+
+
«Example 13
Index»
+ + + + + + + + -- cgit v1.2.3