From d7ec86d36f82bdcde0d23aa22e4402882b8f42c2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 15 Mar 2013 14:34:53 +0400 Subject: [PATCH] added timer constructor... Signed-off-by: Alex A. Naanou --- TeachersTimer/index.html | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/TeachersTimer/index.html b/TeachersTimer/index.html index 8c84374..5d7eb17 100755 --- a/TeachersTimer/index.html +++ b/TeachersTimer/index.html @@ -69,6 +69,17 @@ border-right: solid 10px gray; } +#new_timer { + width: 40px; + height: 40px; + margin: 10px; + border: solid 1px gray; + border-radius: 50%; + color: gray; + font-size: 39px; + text-align: center; + cursor: hand; +} @@ -114,6 +125,15 @@ function formatSum(m){ 'm:'+ m +'' } +function createTimer(parent){ + var timer = document.createElement('div') + timer.className = 'timer' + timer.innerHTML = '
0
' + parent.appendChild(timer) + + timer.setAttribute('onclick', 'toggleTimer(this)') +} + function toggleTimer(elem){ elem = elem var t = elem.getAttribute('timer')*1 @@ -182,18 +202,20 @@ function toggleTimer(elem){ } } + + +function setup(){ + //createTimer(document.getElementById('timers')) +} + - + -
-
0
-
+
+
+
-
-
0
-