PDA

View Full Version : DHTML Tooltip help



codeman420
11-21-2009, 09:45 PM
http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm

onMouseover="ddrivetip('JavaScriptKit.com JavaScript tutorials','yellow', 300)";
onMouseout="hideddrivetip()"

ok im trying to add this list to this:
<div id="NaxxBoss" style="display: none;">
<ul>
<li class="style2">Anub'Rekhan</li>
<li class="style2">Grand Widow Faerlina</li>
<li class="style2">Maexxna</li>
<li class="style2">Noth the Plaguebringer</li>
<li class="style2">Heigan the Unclean</li>
<li class="style2">Loatheb</li>
<li class="style2">Instructor Razuvious</li>
<li class="style2">Gothik the Harvester</li>
<li class="style2">The Four Horsemen</li>
<li class="style2">Patchwerk</li>
<li class="style2">Grobbulus</li>
<li class="style2">Gluth</li>
<li class="style2">Thaddius</li>
<li class="style2">Sapphiron</li>
<li class="style2">Kel'Thuzad</li>
</ul>
</div> to the code above, but it never seems to work , is there a way to put a list into the hover tooltip?

ddadmin
11-22-2009, 06:10 AM
Displaying rich HTML as the tooltip content is possible, but cumbersome. You basically need to ensure that everything you want shown (in this case, the HTML) is defined on one line, with any special characters backslashed (\). Something like:


onMouseover="ddrivetip('<div id="NaxxBoss" style="display: none;">bla bla bla</div>','yellow', 300)";

Unless you understand the subtitles of strings in JavaScript, you may not be successfully in entering HTML as the tooltip's contents.

The good news is, in the next week or so, I'll be releasing a script that supports rich HTML as its contents more readily. Look for it then.