No clue


#1



https://www.codecademy.com/en/courses/web-beginner-en-v6phg/0/3


Oops, try again. It looks like you didn't insert your p after the div with ID #one.


$(document).ready(function() {
    $("<p>HEY</p>").after("<div></div>");
});


#2

The title of this topic would indicate that you might not have a good background understanding of HTML and CSS. If this is the case, then I suggest putting this course on hold and moving over to the HTML and CSS track. Complete those and follow with JavaScript. Then this course will be cakewalk.


#3

I have HTML CSS and JavaScript backgrounds, i was referring to this exercise


#4

jQuery selectors are CSS based. To target the div with id #one it is written as,

$('#one')

This returns a jQuery object that inherits from jQuery.prototype. Methods are properties just as in a vanilla JS object. The method we are asked to apply here is .after() which takes an object, and inserts it in the DOM after the target element.

$('#one').after('<p>I'm a paragraph</p>');

We've just created a paragraph element in the DOM with the text node, "I'm a paragraph". In the next lesson we will be able to select this to create another jQuery object.


#5

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