I would suggest exploring some custom encodings using the jQuery animation function. You can perform certain animations based on the specific position of the boxes in the queue, for example.
$(".arrow").click(function(){ $(".boxes").each(function(){ var i = $(this).index(); //get position of box in list of boxes if(i == 0){ //first box //animate, move down and remove box } else if(i == 1) { //animate, move down } else if(i > 1 && i <= 4) { //animate, move left } else if(i == 5) { //animate, move up } //create another box to appear on the right and move up }); );
This is just a very simple idea, there are probably better ways to do this.
source share