Let\'s say I have three
Trivial with jQuery If you want to do it repeatedly, you'll need to use different selectors since the divs will retain their ids as they are moved around.
$('#div1').insertAfter('#div3');
$('#div3').insertBefore('#div2');
$(function() {
setInterval( function() {
$('div:first').insertAfter($('div').eq(2));
$('div').eq(1).insertBefore('div:first');
}, 3000 );
});