Move Jquery

HTML
<div id="mae"> <div id="a" class="child">E</div> <div id="b" class="child">M</div> <div id="c" class="child">D</div> </div> <br> <div id="mae2"> MOVIDO PARA CÁ <div class="conteudo"></div> </div> <br> <button id="Trocar">Trocar Div</button>
CSS
#mae, #mae2 { text-align: center; display: table; } #a, #b, #c { width: 50px; height: 50px; float: left; } #a { background: red; } #b { background: blue; } #c { background: green; } #Trocar { width: 100%; }
JAVASCRIPT
$().ready(function() { $('#Trocar').click(function() { //$('#mae div:first-child').remove().insertAfter($("#mae div:last")); $('#mae div:first-child').remove().insertAfter($("#mae2 .conteudo")); }); });
Expand for more options Login