I'm not sure if I understand your question correctly...
Do you want to have a div which you dynamically populate with buttons and when you click any of those buttons, they will move to another div?
In that case, I think your question is similar to this question - How to move an element into another element?
From Alejandro Illecas answer:
MOVE:
jQuery("#NodesToMove").detach().appendTo('#DestinationContainerNode')
COPY:
jQuery("#NodesToMove").appendTo('#DestinationContainerNode')
note .detach() use. When copy be careful do not duplicate id's.
JSFiddle
I modified his solution in this JSFiddle in which you can see that you don't need a very cumbersome script to manage a move of an element.
jQuery
function moveButton(elem){
if( $(elem).parent().attr("id") == "nonSelected" ){
$(elem).detach().appendTo('#selected');
}
else{
$(elem).detach().appendTo('#nonSelected');
}
}
HTML
As you can see here, you can use different kinds of elements as well...
<div id="nonSelected">
<!-- TWO INPUT TAGS -->
<input id="btnDefault" onclick="moveButton(this)" type="button" class="btn btn-default" value="Default" />
<input id="btnPrimary" onclick="moveButton(this)" type="button" class="btn btn-primary" value="Primary" />
<!-- THREE BUTTON TAGS -->
<button id="btnDanger" onclick="moveButton(this)" type="button" class="btn btn-danger">Danger</button>
<button id="btnWarning" onclick="moveButton(this)" type="button" class="btn btn-warning">Warning</button>
<button id="btnSuccess" onclick="moveButton(this)" type="button" class="btn btn-success">Success</button>
</div>
<div id="selected">
</div>