Moving Elements Around What did I do wrong?


The question is:
In script.js, add a new line below your code to move your p tag after the div with id #one
create a new jQuery selector that targets the div with the id #two.
Using after again, select the p tag you created and move it after the div with id #two.

My answer:

I feel like I couldn't understand the question @@


I think you just have your statements in the wrong area.

Example 1:


You're trying to say it like English saying "make 'p' after '#two'", but the way the code is being read is like this " '#two' is after 'p'" The parameter is the second parenthesis saying I want this thing AFTER the thing I'm attached to.


And seeing as you don't already have a

in the html section, you will either have to change that so there is a

there with words, OR you can do the following:


I hope this helps explain things a little.


Pretty close, @lolman.


We create a paragraph element in the form of an HTMLString which is inserted into the DOM immediately following <div id="one">Div #1</div>. Now that a paragraph node actually exists, we can target it with a jQuery P-node selector,


and move it to follow <div id="two">Div #2</div>. That's it in a nutshell. The next lesson handles this differently, so for this one, keep it simple.


I'm glad I wasn't the only one having problems understanding this question. It is incredibly unclear. Thanks, @mtf for the clarification.


You're welcome, and free to check mark it if you believe it is the solution to the OP. Seekers are more likely to browse the marked solutions so they can move on.


I do not understand that code


is not correct?