5. Removing Elements


#1

Why its giving wrong .. Codecademy not pssing me .. :confused: please help

$(document).ready(function(){
    $('#one').after('<p>Hello!</p>');{
        $('#two').after($('p'));
            $('p').remove();
    });
});

#2

Hi ItsAmartya,

Try removing that opening curly brace ({) (line 2).

If that doesn't work, please post the error message you're getting and a link to the exercise you're on.
Thanks!


#3

It's definitely the open curly brace on line two {. That needs to be removed. Remember that the { }'s are used to hold the body of a function. Your code is already inside of the .ready(function(){


#4

@objectwhiz54515 @zystvan thanks mate .. It worked.. Should I post the corrected code? so any one else could get help.. :cookie: for you..


#5

@itsamartya

It's usually discouraged, unless you're posting an explanation with it, but if you feel up for writing an explanation of what your code does, have at it! :slightly_smiling:


#6

A post was split to a new topic: Exercise 5, why am I being passed?


#7