Answer the question
In order to leave comments, you need to log in
Adding elements from json?
I have already asked such a question And Sergey Sokolov
prompted me very much . As a result, I get such a hat
. Now I can’t figure out how to me:
Answer the question
In order to leave comments, you need to log in
twitching is purely visual due to the fact that you repeat the iteration with two containers and end it when it is not required.
IMHO, we need to build the logic that the container instance should be a separate entity and the movement of containers should not be related to each other. The birth of the first container according to the page load, then iteration to create the container when X pixels, % or any other condition is left on the screen from the previous container. At least rivet on a timer.
Most likely the logic should be as follows:
function createBlock() {
// получаем следующие данные из массива
// создаем блок и заставляем его ехать. Когда он уедет желательно дестроить его из памяти.
setTimeout(createBlock, 200);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question