|
|
Home Developer Manual 11. API Reference mosToolTip |
| mosToolTip |
|
|
|
|
Last reviewed: 19 Nov 2005, Joomla 1.0.3 mosToolTipCreates the HTML for a Tool Tip. This is a utility function to provide Tool Tip functionality. Returns the HTML code for the tool tip (an icon or text that displays a small window of text with an optional title when the mouse is moved over it). The first parameter must be supplied, otherwise the function will generate a warning. All other parameters have default values that are generally adequate. The overlib_mini.js file must be included in the page output. This file is found in the includes/js directory. Syntaxarray mosToolTip ( string $tooltip [, string $title [, int $width [, string $image [, string $text [, string $href [, boolean $link ]]]]]] )
Defined inlibraries/joomla/functions.php ExamplesExample: A basic tool tip. function basicToolTip() { global $mosConfig_live_site; echo "This is tool tip example one."; echo mosToolTip( "This is a basic tool tip" ); echo "<script type=\"text/javascript\" " . "src=\"$mosConfig_live_site/includes/js/overlib_mini.js\">" . "</script>"; } basicToolTip(); might produce:
This is tool tip example one.
<a href="http://help.joomla.org/content/view/1562/125//?mosConfig_absolute_path=http:/#"
onMouseOver="return overlib('This is a basic tool tip', BELOW, RIGHT);"
onmouseout="return nd();" ><img
src="http://help.joomla.org/includes/js/ThemeOffice/tooltip.png"
border="0" /></a>
<script type="text/javascript"
src="http://help.joomla.org/includes/js/overlib_mini.js">
</script>
which renders as:
Example: A tool tip with a title. function titledToolTip() { global $mosConfig_live_site; echo "This is tool tip example two."; echo mosToolTip( "This is a tool tip with a title", "Tool Tip Title" ); echo "<script type=\"text/javascript\" " . "src=\"$mosConfig_live_site/includes/js/overlib_mini.js\"></script>"; } titledToolTip(); might produce:
This is tool tip example two.
<a href="http://help.joomla.org/content/view/1562/125//?mosConfig_absolute_path=http:/#"
onMouseOver="return overlib('This is a tool tip with a title', CAPTION,
'Tool Tip Title', BELOW, RIGHT);"
onmouseout="return nd();" ><img
src="http://help.joomla.org/includes/js/ThemeOffice/tooltip.png"
border="0" /></a>
<script type="text/javascript"
src="http://help.joomla.org/includes/js/overlib_mini.js">
</script>
which renders as:
Example: A text tool tip with a title and a link to www.joomla.org. function linkedToolTip() { global $mosConfig_live_site; echo "This is tool tip example three."; echo mosToolTip( "This is a text tool tip with a link", "Tool Tip Title", '', 'tooltip.png', "Download Joomla! Here!", "http://www.joomla.org", 1 ); echo "<script type=\"text/javascript\"" . " src=\"$mosConfig_live_site/includes/js/overlib_mini.js\">" . "</script>"; } linkedToolTip(); might produce:
This is tool tip example three.
<a href="http://www.joomla.org"
onMouseOver="return overlib('This is a text tool tip with a link to joomla.org',
CAPTION, 'Tool Tip Title', BELOW, RIGHT);"
onmouseout="return nd();" >Download Joomla! Here!</a>
<script type="text/javascript"
src="http://127.0.0.1/stable/includes/js/overlib_mini.js">
</script>
which renders as: Please report any errors on this page to the Developer Documentation Forum. |
|
| Last Updated ( Tuesday, 03 January 2006 ) |
| < Prev |
|---|






