5. Removing Elements WHAT'S WRONG!


#1

The lesson

My error message:
Oops, try again. Make sure you remove your

using the .remove() function. (Sorry you can't read the function between "your" and "using" because it's just what it is. Tried to fix already. Didn't work. )

My code:

$(document).ready(function() {
    var $paragraph = $('<p>。◕‿‿◕。</p>');
    $('#one').after($paragraph);
    $('#two').after($($paragraph));
    $($paragraph).remove();
});

It shows that it is removed but there's an error message. WHAT'S WRONG!!! ┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻ :rage::rage:


#2

Problem solved. My NEW code for people that have the same problem to copy:
$(document).ready(function() {
var $paragraph = $('

What you wrote

');
$('#one').after($paragraph);
$('#two').after($($paragraph));
$($paragraph).remove();
});
(Sorry you can't read the function between "your" and "using" again because it's just what it is. Tried to fix already. Didn't work. )

#3

The program wants you to use ('p') instead of ($paragraph), though nothing is wrong.


#4

which paragraph you want to remove


#5

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