0

Why this code dont work?

help me pls https://code.sololearn.com/WddNuBeS9mmP/?ref=app

25th Aug 2017, 7:59 PM
davidthegreat
davidthegreat - avatar
3 Answers
+ 22
onload = function() { pos = 0; c = document.getElementById('circle'); c.style.position = "absolute"; t = setInterval(animate, 10); function animate() { if (pos >= 250) { clearInterval(t); } else { pos++; c.style.left = pos + 'px'; } } };
25th Aug 2017, 8:14 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
im understood!!!! my circle was without position!!!!
25th Aug 2017, 8:27 PM
davidthegreat
davidthegreat - avatar
+ 1
thanks
25th Aug 2017, 8:27 PM
davidthegreat
davidthegreat - avatar