Tags for which jtooltips are generated
pathscollide - August 22, 2007 - 16:41
| Project: | jTooltips |
| Version: | 5.x-1.5 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'm getting the impression jtooltips are only generated for title attributes of a tags. Is this the case? Because I have some other elements I'd like to display jtooltips for. Would it be possible to make this customizable?

#1
It would also be nice to be able to exclude certain CSS classes — because one might not want every title to display as a jtooltip.
#2
There in the setting a text area where you can config the Tooltip (jquery) code:
refere to the Tooltips documentation on the official site:
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
#3
If you only want tooltips to show up for certain links, then just edit "Advanced jQuery tooltip configuration" at
www.yoursite.com/admin/settings/jtooltipsWhereas initially it says:
if (Drupal.jsEnabled) {$(document).ready(function () {
$('a').Tooltip({
delay: 0,
track: true,
showURL: false,
showBody: "; "
});
});
}
You'll want to change it to something like:
if (Drupal.jsEnabled) {$(document).ready(function () {
$('a.tooltip').Tooltip({
delay: 0,
track: true,
showURL: false,
showBody: "; "
});
});
}
So instead of searching for any anchor, it will search for an anchor with the
tooltipclass.This is made particularly simple in views, where many field allow you to "Output this field as a link" and gives you control of css classes and alt text. Add the "tooltip" css class and add alt text (which also copies that text into the
titleattribute). Since you can use replacement variables in this alt field, this opens up a whole range of possibilities for have text from excluded fields incorporated into a tooltip, saving valuable real estate in a cramped table!Good luck!