|
Example<script type="text/Javascript"> ttb = document.getElementById("toolTipBox");
function tooltip(message,ext){ // Displays the tooltip at the correct coordinates // @param Type Description // message String The text to be displayed. // ext Object The object containing the data.
ttb.innerHTML = message; coor = new function(){ this.left = 0; this.leftNode = ext; this.top = 0; this.topNode = ext; }
while(coor.leftNode.offsetParent){ coor.left += coor.leftNode.offsetLeft; coor.leftNode = coor.leftNode.offsetParent; }
while(coor.topNode.offsetParent){ coor.top += coor.topNode.offsetTop; coor.topNode = coor.topNode.offsetParent; }
ttb.style.display = "block"; ttb.style.left = (coor.left+ext.offsetWidth)+"px"; ttb.style.top = coor.top+"px"; }
function untooltip(){ // Hides the tooltip. ttb.style.display = "none"; } </script>
|
|
|
|
|
lol took you long enough to post it ¬¬ lol sweet as i said when you made it
|
|
|
|
|
Very nice,I am using this but it wont work if you have more than one on a page,how can I fix this?
|
|
|
|
Very nice,I am using this but it wont work if you have more than one on a page,how can I fix this? It works fine in the example with more than one. View the source of it if you need help understanding how.
|
|
|
|
|
No,I mean not together apart.I'm using it on a forum and I want one in the header and one in the footer.but the new one only opens the other.
|
|
|
|
Any chance you can link me and show me what you're referring to?
|
|
|
|
|
|
<script type="text/Javascript"> ttb = document.getElementById("toolTipBox");
function tooltip(message,ext){ // Displays the tooltip at the correct coordinates // @param Type Description // message String The text to be displayed. // ext Object The object containing the data.
ttb.innerHTML = message; coor = new function(){ this.left = 0; this.leftNode = ext; this.top = 0; this.topNode = ext; }
while(coor.leftNode.offsetParent){ coor.left += coor.leftNode.offsetLeft; coor.leftNode = coor.leftNode.offsetParent; }
while(coor.topNode.offsetParent){ coor.top += coor.topNode.offsetTop; coor.topNode = coor.topNode.offsetParent; }
ttb.style.display = "block"; ttb.style.left = (coor.left+ext.offsetWidth)+"px"; ttb.style.top = coor.top+"px"; }
function untooltip(){ // Hides the tooltip. ttb.style.display = "none"; }
</script> Remove that form your global header. You only need that snippet once. See, this is meant to be a coder's resource, not a ProBoards code. That's the main problem.
|
|
|
|