Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Hover</title>
<style type="text/css">
.dialog {
position:absolute;
padding:3px;
border:1px solid gray;
font:10pt arial;
display:none;
}
</style>
<script type="text/javascript">
function show(cur,element) {
var el = document.getElementById(element);
if (el.style.display == "block") {
el.style.display = "none";
}
else {
el.style.left = cur.offsetLeft+"px";
el.style.top = cur.offsetTop+cur.offsetHeight+"px";
el.style.display = "block";
}
return false;
}
</script>
</head>
<body>
<a href="#" onclick="return show(this,'dlg1');">Test</a>
<div id="dlg1" class="dialog">
Text to show.
</div>
</body>
</html>
Bookmarks