coffeehoock
4/29/2017 - 2:06 PM

js_animate

js_animate

function pos() {
	
	this.px   = "px";
	this.get  = function(numb){
		return numb + this.px;
	}
};

var number = new pos();




var i = 0;

var start = function(){

		console.log('tik');
        train.style.top =  number.get(i);
    
	if (i < 100) { 

        setTimeout(start, 5);
	}

	i++;
};