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