<!DOCTYPE HTML>
<html>
<head> </head>
<body>
<div id='wrapper'>
<div>1 </div>
<div> 2</div>
<div>3 </div>
<div> 4</div>
</div>
<script>
var wrapper_ = document.getElementById('wrapper');
var elem = wrapper_.children[1];
wrapper_.insertBefore(elem, wrapper_.children[3])
</script>
</body>
</html>