W
W
webhero2019-12-02 15:34:48
JavaScript
webhero, 2019-12-02 15:34:48

Why doesn't JS move animation work?

The animation script on JS does not work, although I did everything the same as in the example. When you click on the button - the element must move to a certain position.
Maybe I missed something? Tell
me Link to an example: https://codepen.io/flyneex/pen/gObOwJW
Also, it's not difficult for anyone, tell me how to make this script work without pressing the button when loading the page

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2019-12-02
@webhero

one.

.box {
    background: blue;
    width: 50px;
    height: 50px;
    position: relative;
}

2. setInterval (you have detInterval)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question