From the course: jQuery Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Creating and modifying page content

Creating and modifying page content - jQuery Tutorial

From the course: jQuery Essential Training

Start my 1-month free trial

Creating and modifying page content

- [Instructor] Now, let's take a look at how you can use jQuery to create new content and change existing page content, and again, this is just a quick overview. We'll get deeper in to this as we go through the course, but I wanna give you just a quick introduction to some of the kinds of things that you can do with jQuery. Let's open up the create change underscore intro file, and I'm going to bring this up in the browser, as well. So, while that's happening, let's go ahead and take a look at the code. What we're going to do is see how we can create new content, and change content that's already in the document. The first thing I'm going to do is create some new content by simply calling the jQuery function with a string of HTML. So, uncomment these two lines here. In this case, I call the jQuery function with a string that has a paragraph tag, and that will take the string, and create a new dom element that is represented by a paragraph, and store it in this variable. Then, I'll…

Contents