<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/web-beginner-en-v6phg/0/5?curriculum_id=50a3fad8c7a770b5fd0007a1
<In what way does your code behave incorrectly? Include ALL error messages.>
I don’t know what I am doing wrong, it seems to behave correctly in the html viewer. Thanks!
$(document).ready(function(){
$p = $('<p>text</p>');
$(one).after($p);
$(two).after($p);
($p).remove(); // gives error 1
});
$(document).ready(function(){
$p = $('<p>text</p>');
$(one).after($p);
$(two).after($p);
('p').remove(); // gives error 2
});
Error 1:
'Oops, try again. It looks like your < p > is still part of your HTML document. Check the Hint if you need help!'
Error 2:
‘Uncaught TypeError: “p”.remove is not a function’