| 1 |
// $Id: README,v 1.1.4.5 2007/05/22 17:49:19 psicomante Exp $
|
| 2 |
// jQuery Tooltips.
|
| 3 |
//
|
| 4 |
// Module developed by Psicomante
|
| 5 |
// psicomante.katapekkia.net - psicomante(AT)gmail(.)com
|
| 6 |
//
|
| 7 |
|
| 8 |
For support, please submit via the project issues here: http://drupal.org/project/jtooltips
|
| 9 |
|
| 10 |
For custom Drupal development, email psicomante AT gmail DOT com
|
| 11 |
|
| 12 |
**WHAT THE MODULE IS
|
| 13 |
|
| 14 |
This plugin enhances the default tooltips.
|
| 15 |
You can style them via stylesheets and improve their behavior.
|
| 16 |
The tooltip is shown at the mouse position and moves if there isn't enough space.
|
| 17 |
|
| 18 |
**INSTALL INSTRUCTIONS
|
| 19 |
|
| 20 |
1. Enable the module at Administer > Site building > Modules > Other
|
| 21 |
2. Optional: install sweetTitles
|
| 22 |
|
| 23 |
- Download sweetTitles from: http://www.dustindiaz.com/sweet-titles-finalized
|
| 24 |
|
| 25 |
- Copy addEvent.js and sweetTitles.js from the sweetTitles distribution
|
| 26 |
to the js directory of jTooltips.
|
| 27 |
|
| 28 |
3. Optional: configure jTooltips at
|
| 29 |
|
| 30 |
Administer > Site configuration > jQuery tooltips
|
| 31 |
|
| 32 |
**ENABLE tooltip for jQuery or sweetTitles
|
| 33 |
|
| 34 |
It's simple to enable tooltip for jQuery. Default behavior is using jQuery tooltips.
|
| 35 |
|
| 36 |
Using SweetTitles: you need to enable it at admin/settings/jtooltips, selecting "sweetTitles" from the dropdown menu.
|
| 37 |
You should download the script pack from the official page and put it in the /js folder in modules/jtooltips
|
| 38 |
or sites/all/modules/jtooltips (depends on where the jTooltips module folder is).
|
| 39 |
|
| 40 |
**WHERE DOWNLOADING SCRIPTS and getting Information
|
| 41 |
|
| 42 |
SweetTitles: necessary if you want to use them
|
| 43 |
http://www.dustindiaz.com/sweet-titles-finalized
|
| 44 |
|
| 45 |
Tooltip for JQuery: optional, a packed version is included in the Drupal module
|
| 46 |
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
|
| 47 |
|
| 48 |
**STYLING TOOLTIPS
|
| 49 |
|
| 50 |
To style tooltips, you should modify css in the module folder. (jtooltips.css for jQuery tooltips, sweetTitles.css for sweetTitles)
|
| 51 |
|
| 52 |
**APPLY CUSTOM BEHAVIOR to Jquery Tooltips
|
| 53 |
|
| 54 |
In the settings page for this module (admin/settings/jtooltips), if you select
|
| 55 |
jQuery tooltips, you will find a textarea with a script inside. The textarea
|
| 56 |
can be modified to change the function of the jQuery tooltips.
|
| 57 |
|
| 58 |
Some examples are listed in this page:
|
| 59 |
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
|
| 60 |
|
| 61 |
There are some available options:
|
| 62 |
* delay (Number): The number of milliseconds before a tooltip is display, default is 250
|
| 63 |
* event (String): The event on which the tooltip is displayed, default is “mouseover”, “click” works fine, too
|
| 64 |
* track (Boolean): If true, let the tooltip track the mousemovement, default is false
|
| 65 |
* showURL (Boolean): If true, shows the href or src attribute within p.url, default is true
|
| 66 |
* showBody (String): If specified, uses the string to split the title, displaying the first
|
| 67 |
part in the h3 tag, all following in the p.body tag, default is null
|
| 68 |
* extraClass (String): If specified, adds the class to the tooltip helper, default is null
|
| 69 |
* fixPNG (Boolean): If true, fixes transparent PNGs in IE, default is false
|
| 70 |
|
| 71 |
**EXAMPLES
|
| 72 |
Shows tooltips for anchors, inputs and images, if they have a title
|
| 73 |
|
| 74 |
if (Drupal.jsEnabled) {
|
| 75 |
$(document).ready(function () {
|
| 76 |
$('a, input, img').Tooltip({
|
| 77 |
delay: 0,
|
| 78 |
track: true,
|
| 79 |
showURL: true,
|
| 80 |
showBody: "; "
|
| 81 |
});
|
| 82 |
});
|
| 83 |
}
|
| 84 |
|
| 85 |
For support, please submit via the project issues here: http://drupal.org/project/jtooltips
|
| 86 |
|
| 87 |
For custom Drupal development, email psicomante AT gmail DOT com
|
| 88 |
|
| 89 |
|