Moving Elements Around


can someone explain to me this code i do not feel it is right ? Is what i'm doing correct or there is something that I'm missing here here is my code below

var $paragraph = $("

I'm adding text after div 1




It looks like you forgot to put paragraph tags around your text.


you should insert it between



var $paragraph = $('<p>Yes!</p>');

$(document).ready(function() {



I completed this section but it was more fluke than anything else. I think I did not understand the first instruction:

1. In script.js, add a new line below your code to move your < p > tag after the < div > with id #one

My solution does not feel right even though I was able to pass to the next section.
This is how I did it:

> $(document).ready(function() {
>     //$('#one').after('<p>You can place any text you like in p tags</p>')
>     var $p = $('<p>You can place any text you like in p tags</p>')
>     $('#two').after($p);

> });

Can you tell me why it feels off to me?


It's still a bit strange anyway. I also passed this lesson by adding <p> pair </p>, but wait... In HTML we can place just text (without any tags) to <body>, so why don't lazy jQuery wish to add some text without tags after div tag? Any ideas?


This is what I used:

$(document).ready(function() {
var $paragraph = $('<p>Wassup</p>')


Cheers bro. Really helped show where I was going wrong.