Math Helper

I'm not sure why I made this, guess I was just bored one night. It doesn't do much, it basically just walks you thru the sequence for doing basic addition. Much more could be done with this code, at the moment I just don't have any practical application for it so I haven't done anything more.

Paramaters

MathAdd(value1, value2, random, className)
value1The value of the first number to be added. If random, this the number will be between 0 and value1
value2The value of the second number to be added. If random, this the number will be between 0 and value2
randomBoolean, whether or not the values to be added should be randomized
class For styling purposes, the div that contains the Math Helper will be given this class name

Examples

This is how the above Math Helper is created. Assuming a div has been created with id of 'math_div'.

var math = new MathAdd(100000, 10000, true, 'add_div'); document.getElementById('math_div').appendChild(math.getDOM()); math.focus();

Files

MathAdd Classmath.js
MathAdd Demo math.html
Compressed math_com.js. MathAdd class compressed by my php script to about 60% the origional size.