http://jsfiddle.net/fxLcy/ - an example showcasing the use of setTimeout.
http://jsfiddle.net/fxLcy/1/ - this demo does not include setTimeout. Although all elements are correctly positioned, I am in need of that delayed animation =/
My goal is to arrange 6 cards per row using CSS transition and setTimeout. However, I am facing a challenge where I cannot use increment for my left and top parameters within setTimeout, as it accumulates all increments and places the elements in their final positions prematurely.
var self = $(this);
if (increment % 6 === 0 && increment !== 0) {
topIncrement++;
leftIncrement = 0;
};
setTimeout(function() {
self.css({
'left' : 10 + leftIncrement * (resizedWidth + 20),
'top' : $("#controlPanel").height() + 10 + topIncrement * (resizedHeight + 20)
});
}, increment * 500)
leftIncrement++;
increment++;