The concept of online tooltips is not new; and is evidenced in previous technologies such as the image “alt” tags used within HTML, which display a textual alternative to visual media. Prior generation DHTML solutions were also deployed as a means of not only describing what a page element is, or how to interact with it, but to provide extended content for visitor edification and search engine optimization.
Today, the power of jQuery leverages the proven value of dynamic tooltips to deliver eyecatching benefits; such as the implementation offered by jQuery Tools, which boasts of its “tooltips done right,” Tooltip.
Tooltip allows its users to configure the design, timing and positioning of their tooltips.
According to its publisher, Tooltip allows its users to configure the design, timing and positioning of their tooltips.
In its simplest initialization, Tooltip can be called thusly:
$("[title]").tooltip();
In this example, one or more elements are specified via jQuery to trigger a tooltip; using the trigger element’s title attribute to provide its tooltip’s content. The actual tooltip element is auto-generated in this case.
Manual tooltips are also available, using HTML elements such as DIVs, which are located adjacent to the trigger element. This allows for any HTML (including images and links) to be used as content, initializing the trigger without the use of the title attribute.
There are many configuration options available and CSS can be added into the code as well, i.e.:
$(".trigger").tooltip({ position: "bottom left", opacity: 0.7});
Sample code files and demos, royalty-free tooltip graphics and other resources are available from the script’s support website.