Permalink
Browse files

Updated Documentation

  • Loading branch information...
1 parent 623d215 commit 14ea74cc8b8142467139d8724daec5b45e9848d0 @kgaddy committed Mar 25, 2012
Showing with 24 additions and 4 deletions.
  1. +23 −3 README.md
  2. +1 −1 css/styles.css
View
26 README.md
@@ -11,6 +11,26 @@ gameclock.js is a javascript library that can be used to create a timer/clock fo
A step by step guide on how to use gameclock.js:
-
-
-## Demo's
+Use gameclock.js:
+<script type="text/javascript" src="js/gameclock.js"></script>
+Create an instance of the clock:
+var clock = new Clock({
+ time:9000,
+ displayEL:'clock',
+ stopAferTimeout:true,
+ resetAfterTimeout:false,
+ timeoutCallBack:stopme
+});
+Start The clock:
+clock.StartClock();
+Stop The clock:
+clock.StopClock();
+Rest The clock:
+clock.ResetClock();
+
+##Configuration:
+displayEL: The display element. This will display the current state of the clock in a element.
+time: The amount of time for the game.
+stopAferTimeout: If true, will stop at zero. If false, will contine to display a negative time.
+resetAfterTimeout: If true, will reset the clock to the "time" value and continue to countdown.
+timeoutCallBack: A callback function that will fire when the clock reaches zero.
View
2 css/styles.css
@@ -31,7 +31,7 @@ body{
}
.controls{
margin-top:100px;
- width:250px;
+ width:290px;
margin-left:auto;
margin-right:auto;
}

0 comments on commit 14ea74c

Please sign in to comment.