Using Javascript in Tooltips

Question: Where is the message.js file for the tooltip code?
ted shear

Answer: message.js is the javascript that my site uses to select a message to display under the main site heading. I used it in the second example script to show that you can not only use the tooltip script to display images but that you can also call other scripts to dynamically decide what to display. The message.js script is part of what the example is displaying and is not a part of the tooltip script itself.

My page Displaying "Random" Text or Images shows how to code your own message.js script.

You can incorporate javascript (or any valid html code) into an extended tooltip by placing the required code between the <div class="tip"> and </div> tags for the tip. This is one of the main benefits of using the extended tooltip in place of an ordinary tooltip.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow