append Children from a Box to another

append Children from a Box to another

Hi,

what i am trying to do is to remove items from one box " selectedFrom" and add it to its sibling " apendTothis", but unfortunately if i am selecting the children and append it to the specific sibling box " apendTothis", all children from other boxes will apear to every sibling box.

example of html struct:

  1. ...
  2. <div class="parent>
  3.       <div class="selectedFrom">
  4.             <div class="child">item</div>
  5.             <div class="child">item</div>
  6.             <div class="child">item</div>
  7.       </div>
  8.       <div class="appendToThis"></div>
  9. </div>
  10. <div class="parent>
  11.       <div class="selectedFrom">
  12.             <div class="child">item</div>
  13.       </div>
  14.       <div class="appendToThis"></div>
  15. </div>
  16. ...

and the jquery:
  1.     var kids = $('. selectedFrom').children('. child');
  2.     var box = $('. selectedFrom').next(); // in this case should be . appendToThis

  3.     kids.appendTo(box);
I know i will get an array, but how can be sure that only children from siblings will appear to the nex-sibling-box and every child stays still at its parent div box?

thanx in advance.
m.