Team:Warsaw/test komorka1
From 2009.igem.org
(Difference between revisions)
Line 23: | Line 23: | ||
{ | { | ||
isShowing = true; | isShowing = true; | ||
- | document.getElementById("tekscik").style.left = mouseX | + | document.getElementById("tekscik").style.left = mouseX+10+"px"; |
- | document.getElementById("tekscik").style.top = mouseY | + | document.getElementById("tekscik").style.top = mouseY+10+document.body.scrollTop+"px"; |
document.getElementById("tekscik").innerHTML = thisText; | document.getElementById("tekscik").innerHTML = thisText; | ||
document.getElementById("tekscik").style.display = "block"; | document.getElementById("tekscik").style.display = "block"; | ||
Line 38: | Line 38: | ||
{ | { | ||
if (!callingEvent) callingEvent = window.event; | if (!callingEvent) callingEvent = window.event; | ||
- | mouseX = callingEvent. | + | mouseX = callingEvent.layerX; |
- | mouseY = callingEvent. | + | mouseY = callingEvent.layerY-1; |
if (isShowing) | if (isShowing) | ||
{ | { | ||
- | document.getElementById("tekscik").style.left = mouseX | + | document.getElementById("tekscik").style.left = mouseX+10+"px"; |
- | document.getElementById("tekscik").style.top = (!is_safari) ? mouseY | + | document.getElementById("tekscik").style.top = (!is_safari) ? mouseY+10+document.body.scrollTop+"px" : mouseY+10+"px" ; |
} | } | ||
} | } |
Revision as of 09:10, 20 September 2009