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
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

pathscollide - August 22, 2007 - 18:14
Category:support request» feature request

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

Psicomante - September 22, 2007 - 12:12

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

biocomp.pat - October 16, 2009 - 03:20

If you only want tooltips to show up for certain links, then just edit "Advanced jQuery tooltip configuration" at www.yoursite.com/admin/settings/jtooltips

Whereas 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 tooltip class.

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 title attribute). 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!

 
 

Drupal is a registered trademark of Dries Buytaert.