Hello Skateside,
thank you for your response. I took your advice and done everything what you said, but I have a bunch of errors, still.
Typeof: "Problem at line 14 character 20: Missing radix parameter.
return parseInt(this.element.offsetLeft);".
Also, I ran my code at PhpED, errors are the same. Of course, can't run code on button click, although /onclick event/ should call function for starting animation.
This is how my animation should work(project with no encapsulation):
My first project