Append


#1

I typed the following in and it doesn't work.

$('#one').after('

Yikes

');

#2

First off, we cannot write a string with line breaks in it. Everything must be in one line...

'Yikes'

Furthermore, the exercise expects us to write an HTML element, a paragraph, containing some text.

'<p>Yikes!</p>'

Now we are ready.

$(document).ready(function(){
    // we need the ready handler because HTML in the source
    // document needs to load before the script runs
});

Putting it all together, we get,

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

#3

Thanks. When I copied and pasted it the string got broken. I did type it in all on one line but I didn't include the document ready function.