I have 3 divs want to reverse the order on doucment ready
First Second
$( $("div[id|=block]") .slice(1) .get() .reverse() ) .insertBefore("div[id|=block]:first");
http://jsfiddle.net/8adwS/
Also note that you can add the array reverse syntax to the jQuery function syntax, which would save you a selector.