I have 3 divs want to reverse the order on doucment ready
First Second
First Second Third
And try this in Jquery
$('#parent > div').each(function() { $(this).prependTo(this.parentNode); });
You can see example in jsfiddle http://jsfiddle.net/N7PGW/