PDA

View Full Version : Image w/ description tooltip



springwood
10-26-2007, 12:26 PM
I've been looking at script http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm.

It says to place it in the head tag. Within the code it also says ...

/* IMPORTANT: Put script after tooltip div or
put tooltip div just before </BODY>. */

I don't quite understand this comment. Placing the code in the head tag means the code will always be before the </body> tag anyway as the head tag appears before the body tag anyway. Could someone explain please? Thank you.

insanemonkey
10-26-2007, 12:35 PM
just put it in <head> tags and it will work..

make sure your body tags are before it though?

jscheuer1
10-26-2007, 03:25 PM
The confusion is the result of the fact that there were various workable ways that the script could be installed, but then it was updated. However, the demo page was never updated to reflect all of those changes properly, and that comment (which even when it was valid, was an oversimplification):



/* IMPORTANT: Put script after tooltip div or
put tooltip div just before </BODY>. */

though no longer applicable in the current version (the script now creates its own tool tip division), was retained.

To make a short story even shorter:


Delete the comment.
Put Step 1 in the head.
Put Step 2 in the normal flow of your page, in the body section.