--- id: bad87fee1348bd9aed608826 title: Use appendTo to Move Elements with jQuery challengeType: 6 forumTopicId: 18340 dashedName: use-appendto-to-move-elements-with-jquery --- # --description-- Now let's try moving elements from one `div` to another. jQuery has a function called `appendTo()` that allows you to select HTML elements and append them to another element. For example, if we wanted to move `target4` from our right well to our left well, we would use: ```js $("#target4").appendTo("#left-well"); ``` Move your `target2` element from your `left-well` to your `right-well`. # --hints-- Your `target2` element should not be inside your `left-well`. ```js assert($('#left-well').children('#target2').length === 0); ``` Your `target2` element should be inside your `right-well`. ```js assert($('#right-well').children('#target2').length > 0); ``` You should only use jQuery to move these elements. ```js assert(!code.match(/class.*animated/g)); ``` # --seed-- ## --seed-contents-- ```html

jQuery Playground

#left-well

#right-well

``` # --solutions-- ```html

jQuery Playground

#left-well

#right-well

```