Move an item from one div to another and back again using jquery

Posted by Jean on Stack Overflow See other posts from Stack Overflow or by Jean
Published on 2010-03-09T06:40:47Z Indexed on 2010/03/09 7:06 UTC
Read the original article Hit count: 198

Filed under:

Hello,

<div id=i1><span id=e1>Item 1</span></div>
<div id=i2><span id=e2>Item 2</span></div>

When I click on Item 1 it should be deleted and moved to i2 and when I click on Item 1 again it must go back to i1

Yes, I tried append(), it goes to i2, but on clicking again it does not move back to i1

How do I get to do it.

Thanks Jean

© Stack Overflow or respective owner

Related posts about jQuery