jQuery move all children to another div

jquery

Solution

Here you have a very simple example of it: http://jsfiddle.net/LhR79/

As they have already told you. You need to use `appendTo` instead of `append` and specify the selector type (class, id... ) using the `.` or the `#` preceding the name. In your case: `#popupWrapper` as popupWrapper is an ID and not a class.

Problem

I have a `div` with many childen. How do I move all of them to another `div` using `jQuery`? my code looks like: ``` jQuery("body").append("<div id='popupWrapper'></div>"); var myID = $('.FloatingFrameLightBlue1').attr('id'); jQuery(myID).children().append("popupWrapper"); ``` But it doesn't work. What I'm doing wrong?

Original source