File: index.html

Recommend this page to a friend!
  Classes of Dave Norminton   Number Run   index.html   Download  
File: index.html
Role: Example script
Content type: text/plain
Description: Example
Class: Number Run
Show a number count down or up in a page element
Author: By
Last change: updated to es6 and made methods chainable
Add files via upload
Date: 2 years ago
Size: 754 bytes
 

Contents

Class file image Download
<!doctype html> <html> <head> <title>Text Runner js</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="wrapper"> <div class="example1"> <h1>Example counting up with an interval of 100 miliseconds</h1> <span id="number"></span> </div> <div class="example2"> <h1>Example counting down with an interval of 10 miliseconds</h1> <span id="number2"></span> </div> <div> <script src="numberRun.js"></script> <script> var run = new numberRun('number'); run.setStart(0).setFinish(2350).setInterval(100).count(); var run2 = new numberRun('number2'); run2.setStart(600).setFinish(50).setInterval(10).count() </script> </body> </html>