Edit in JSFiddle

var container = document.getElementById('container'),
    id3 = document.getElementById('id3');

container.appendChild(id3);
<div id="container">
    <div id="id1">ID: 1</div>
    <div id="id2">ID: 2</div>
    <div id="id3">ID: 3</div>
    <div id="id4">ID: 4</div>
    <div id="id5">ID: 5</div>
<div>