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:
- ...
- <div class="parent>
- <div class="selectedFrom">
- <div class="child">item</div>
- <div class="child">item</div>
- <div class="child">item</div>
- </div>
- <div class="appendToThis"></div>
- </div>
- <div class="parent>
- <div class="selectedFrom">
- <div class="child">item</div>
- </div>
- <div class="appendToThis"></div>
- </div>
- ...
- var kids = $('. selectedFrom').children('. child');
- var box = $('. selectedFrom').next(); // in this case should be . appendToThis
-
- 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.