--- id: bad87fee1348bd9aed608826 title: Use appendTo to Move Elements with jQuery challengeType: 6 forumTopicId: 18340 localeTitle: 使用 jQuery 的 appendTo 方法移动元素 --- ## Description
现在我们学习把标签从一个div移动到另一个div。 jQuery 有一个appendTo()方法,可以选取 HTML 标签并将其添加到另一个标签里面。 例如,如果要把target4从右框移到左框,可以设置如下: $("#target4").appendTo("#left-well"); 请把target2标签从left-well移动到right-well
## Instructions
## Tests
```yml tests: - text: target2标签应该不在left-well内。 testString: assert($("#left-well").children("#target2").length === 0); - text: target2标签应该在right-well内。 testString: assert($("#right-well").children("#target2").length > 0); - text: 仅用 jQuery 移动这些标签。 testString: assert(!code.match(/class.*animated/g)); ```
## Challenge Seed
```html

jQuery Playground

#left-well

#right-well

```
## Solution
```html

jQuery Playground

#left-well

#right-well

```