Bubbling Library > Examples

Examples of Using the Bubbling Technique for ToolTips

Benefit from the bubbling technique, include the corresponding behavior for Tooltips and all the links in your page will have a nice dynamic tooltip attach it:

Hover over me to see a Tooltip without URL!

Hover over me to see a Tooltip with the URL inside!

Image inside an Anchor: Bookmark

Button example: YUI

The most common technique for apply tooltips to the complete document is the use of "getElementByTagName", processing each tag and creating one instance of the ToolTips object attached to each tag. This pre-processing can freeze your browser, and create memory leaks when you are using dynamic areas. With the bubbling technique we can guarantee the success without worry about dynamic areas. Also we don´t need to refer a link directly using the tabName or an unique ID to create the corresponding tooltip object, decreasing the count of links with ID included inside the XHTML code.

This implementation has only an instance of the tooltip object for the document, decreasing the memory usage and rendering in realtime each mouseover event.