2

I have div boxes of identical heights and widths stacked up into two columns, like so: enter image description here

Is it possible to make it behave in such a way that...when any of the boxes on the left is removed (using jQuery), the top-most box on the right will move the bottom spot on the left. So essentially, the boxes moving in the direction indicated by the pink arrow.

Kama
  • 193
  • 1
  • 3
  • 13

2 Answers2

2

You can add remove event and check it on your div box. And then append first element to another column

$('.yourDivBox').bind('remove', function() {
$('.secondColumn').first().appendTo('.firstColumn');
});

Something like this. Sorry I haven't time to check my code

Community
  • 1
  • 1
aDaemon
  • 131
  • 3
0

It can be done in CSS3, some browser might not support it! I've created an example below:

http://jsfiddle.net/swxn4/

AZee
  • 23
  • 4