I need to go through each div.row to add or remove a flip class that has a CSS3 3D transform effect.
When I apply this add / remove class to each ".row" using jquery each (), all divs get the ".flip" class, added or removed at the same time. I need it to be delayed, so it looks like a domino effect.
Any idea how I can make this work? Or how to add / remove a flip class one at a time?
This is what I found, but it does not work:
$('.row').each(function(i){
if($(this).hasClass('flip')){
$(this).delay(i*500).removeClass('flip');
}else{
$(this).delay(i*500).addClass('flip');
}
});
source
share