I think I'm confusing myself more then needed. Can someone help with 3. Before and After (jQuery)?


#1

I originally only had, $('#one').after('<p> hello </p>'); in script.js and it would allow me to pass the lesson. I went quickly and tried to add the

$(document).ready(function(){ 
$('#one').after('<p> hello </p>');
 });

and it gave me the error "Oops, try again. It looks like you added a <p> after the <div> with ID #two." What is going on here can someone help explain?


#2

Hi Newwalker20,

It sounds like Codecademy is accidentally running an old version of your code or something like that. Does refreshing the page help?


#3

I am also having trouble with this problem

$(document).ready(function(){
    ("#one").after("<p>text</p>")
    });

I have also tried without any text, and switching the place of the id ( I am not an expert so I'm not totally confident I am right.) I cannot get it to run no matter what I do.

Help?

Error is :Oops, try again. It looks like you didn't insert your <p> after the <div> with ID #one.


#7

I'm not sure, but maybe it's the semi-colon after the end parenthesis on line 2. Try that, maybe it'll work


#15