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-300+"px";
+
   document.getElementById("tekscik").style.left = mouseX+10+"px";
-
   document.getElementById("tekscik").style.top = mouseY-170+document.body.scrollTop+"px";
+
   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.clientX;
+
   mouseX = callingEvent.layerX;
-
   mouseY = callingEvent.clientY-1;
+
   mouseY = callingEvent.layerY-1;
   if (isShowing)
   if (isShowing)
   {
   {
-
document.getElementById("tekscik").style.left = mouseX-300+"px";
+
document.getElementById("tekscik").style.left = mouseX+10+"px";
-
document.getElementById("tekscik").style.top = (!is_safari) ? mouseY-170+document.body.scrollTop+"px" : mouseY-170+"px" ;
+
document.getElementById("tekscik").style.top = (!is_safari) ? mouseY+10+document.body.scrollTop+"px" : mouseY+10+"px" ;
   }
   }
}
}

Revision as of 09:10, 20 September 2009