JavaScript Tutorial/GUI Components/Tooltips
Tooltips based on div
<source lang="javascript">
<html> <head> <title>Style Example</title> <script type="text/javascript">
function showTip(oEvent) { var oDiv = document.getElementById("toolTipComponent"); oDiv.style.visibility = "visible"; oDiv.style.left = oEvent.clientX + 5; oDiv.style.top = oEvent.clientY + 5; } function hideTip(oEvent) { var oDiv = document.getElementById("toolTipComponent"); oDiv.style.visibility = "hidden"; }
</script> </head> <body>
Move your mouse over the hyper link.
<a href="http://www.wbex.ru"
onmouseover="showTip(event)" onmouseout="hideTip(event)">www.wbex.ru</a>
Custom Tooltip
detail information for www.wbex.ru
</body> </html></source>