Unable to complete "Removing Elements"


#1

I'm unable to continue from the JQuery exercise called "Removing Elements":
https://www.codecademy.com/courses/web-beginner-en-v6phg/0/5?curriculum_id=50a3fad8c7a770b5fd0007a1#


My code behaves correctly, and removes the paragraph as expected. But I get an error messages saying "Oops, try again. Make sure you remove your <p> using the .remove() function.".

Here is my code from script.js:

$(document).ready(function(){
    $('#one').after('<p>Something here</p>');
    var two = $('#two');
    var $p = $('p');
    $(two).after($p);
    
    $('p').remove();
});

The only line I added for this specific lesson was this:

    $('p').remove();

Does anyone have an idea why this error message occurs?

Thanks!


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.