Team:Uppsala/synbioday

From 2013.igem.org

(Difference between revisions)
Line 44: Line 44:
timer = setInterval(domedaystimer, 1000);
timer = setInterval(domedaystimer, 1000);
</script>
</script>
-
<script type="text/javascript">
 
-
var x = document.getElementById('b').style.left;
 
-
            var y = document.getElementById('b').style.top;
 
-
            var d_x = 75;
 
-
            var d_y = 100;
 
-
            var interval = 2;                  //move by only 2px...
 
-
            function moveImage() {
 
-
                if(x < d_x) x = x + interval;
 
-
                if(y < d_y) y = y + interval - 1;                  //move y by only 1px
 
-
 
-
                document.getElementById('b').style.left = x+'px';
 
-
                document.getElementById('b').style.top = y+'px';
 
-
 
-
                if ((x + interval < d_x) && (y + interval < d_y)) {
 
-
                    window.setTimeout('moveImage()',100);
 
-
                }
 
-
            }
 
-
</script>
 
</head>
</head>
Line 155: Line 137:
          
          
<div id="synbio_bilder">
<div id="synbio_bilder">
-
 
+
<div id="countdown" ></div>
         </div>
         </div>
Line 169: Line 151:
-
<div id="countdown" ></div>
+
 
-
<div id="b" onload="moveImage()"></div>
+
 
</body>
</body>
</html>
</html>

Revision as of 20:03, 22 August 2013