Loop through stacked element continiously
I am trying to look the trough the display of a bunch of absolutely stacked elements, but it stops when it gets to the last one. My code looks like below: Any ideas on how I can get it to work?
- $(".box").each(function () {
- $(".box").click(function () {
- $(this).removeClass("retain").removeClass("back");
- $(this).addClass("back").delay(1000).queue(function(){
- $(this).removeClass("back").dequeue().addClass("retain");
- });
- });
- });
See complete working code on jsFiddle.