This course is out of date and does not reflect our standards or industry best practices. We now recommend you take the Complete Intro to Web Development, v3 course.

Check out a free preview of the full Learning jQuery course:
The "Creating elements" Lesson is part of the full, Learning jQuery course featured in this preview video. Here's what you'd learn in this lesson:

$(“<div></div>”) or $(“<div />”) creates a new div that’s disconnected from the DOM Can use second argument to initialize other properties when creating elements. For example, $(“<div />”, { ‘class’: “test”, click: fn }); - Tip: make sure to use quotes around class because it is a reserved word Using appendTo to attach new elements and audience clarification on creating elements Audience asks how to append a lot of elements and Karl codes example

Get Unlimited Access Now