Dynamic Tooltips: Final Thoughts - Doc JavaScript | WebReference

Dynamic Tooltips: Final Thoughts - Doc JavaScript


A Final Word

I was working on my computer two weeks ago, when I noticed how much tooltips help me get my work done. Windows applications are loaded with tooltips, so I came up with two main questions:

This column answered these questions. We presented a script that creates dynamic, full-featured tooltips for standard hypertext links. You can add tooltips to provide additional information about your links.

Like always, we focused on a backward-compatible, cross-browser solution. Our tooltips work on both fourth-generation browsers, on all platforms. They are also compatible with older browsers, because they don't affect them. In other words, this is a win-win script. In this column you learned:

  1. How to construct a tooltip with HTML.
  2. How to define a stylesheet for each tooltip on the page.
  3. How to associate a tooltip with a specific link via its event handlers.
  4. How to find out when the tooltip should be displayed.
  5. How to display a tooltip when required.
  6. How to clear a tooltip when the user removes the pointer from the link.
  7. How to associate a tooltip with multiple links that share the same URL.

For your reference, you may view the code for the first and second versions of the script.

https://www.internet.com


Created: March 26, 1998
Revised: March 26, 1998

URL: https://www.webreference.com/js/column16/final.html