InterviewSolution
| 1. |
How Do I Move An Element From One Place To Another? |
|
Answer» There's no need for node "IMPORTING" like there is with DOM. Just remove the element from its CURRENT place, and then add the element to its new place. The element's content (including its element children) will NATURALLY "tag" along for the ride. You have to remove the element before adding it to its new place because elements MAY have only one PARENT returned by get Parent (). new Parent.add Content (elt.detach ()); There's no need for node "importing" like there is with DOM. Just remove the element from its current place, and then add the element to its new place. The element's content (including its element children) will naturally "tag" along for the ride. You have to remove the element before adding it to its new place because elements may have only one parent returned by get Parent (). new Parent.add Content (elt.detach ()); |
|