Switching Content between two DOM elements
Hi Guys,
Sorry this could be a really stoopid question, just started learning jQuery I'm trying to switch content of two DOM elements (I hope i've got the terminology correct there) but i'm struggling I can clone 'test_container_2''s content to ' test_container_1' but I would really like to switch the content '1' to '2' and '2' to '1' in one movement if possible, or if I can somehaow capture the content in a variable and then apply the variable to the other content of the container that would be fantastic, any help would be greatly appreciated I've checked out the manual but can't find exactly what I need
Cheers
BEFORE
<div class="test_container_1">
<div class="test_element_1">
element 1
</div>
</div>
<div class="test_container_2">
<div class="test_element_2">
element 2
</div>
</div>
AFTER
<div class="test_container_1">
<div class="test_element_2">
element 2
</div>
</div>
<div class="test_container_2">
<div class="test_element_1">
element 1
</div>
</div>
(P.S jQuery rocks, big time!)