with jQuery:
$('#one').parent().append($('#three')).append($('#one')).append('#two');
this way you have, div 3, 1, 2 in that order.
You are selecting one of the divs, and selecting it's parent. then you append them at the order you want.
if you want to use pure javascript:
var parent = document.getElementById('one').parentNode;
parent.appendChild(document.getElementById('three'));
parent.appendChild(document.getElementById('one'));
parent.appendChild(document.getElementById('two'));
now, assuming you have a lot of divs, i will assume #one til #ten:
you can create an array, with the ids ordered as you wish, for example:
var order = ['ten', 'eight', 'six', 'four', 'two', 'nine', 'seven', 'five', 'three', 'one'];
for(var i = 0; i < order.length; i++){
parent.appendChild(document.getElementById(order[i]));
}
is this what you're looking for?