Answer the question
In order to leave comments, you need to log in
How to find elements in an image grid?
Hello!
There is a grid of images to which the "flip" animation is randomly applied.
The prototype can be viewed here dev.bakin.ru
All elements (squares) are stored in the timeouts object as properties:
(function() {
...
var timeouts = []
id = "timeoutID" + cardID;
...
timeouts[id] = setTimeout(function() {
var c = card.classList,
newTime = randomNum( timeMin, timeMax ) * 1000;
c.contains("flipped") === true ? c.remove("flipped") : c.add("flipped");
cardsTimeout( id, newTime, card );
}, time);
})();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question