Join Joe Marini for an in-depth discussion in this video Altering page content, part of jQuery Essential Training.
- [Narrator] We've talked about creating content.…We've talked about inserting content.…Now let's talk a little bit about altering content…that is already in the page.…In your editor, let's open the altering_start file,…and the first function I'm going to demonstrate…is the wrap function.…So let me put the code in, and I'll write a selector…that gets all the paragraph tags,…and we're going to call wrap, div style equals color red.…So I have to close that div off.…Let's save that.…
The wrap function wraps content around existing content.…The argument that you give to the wrap function…is the content that you want to wrap around…the result of this jQuery expression.…If you look at the document, you can see…that this is pretty much the sample we've been using…throughout the course, so far, so here's our example div.…Here's all these paragraphs that we've been working with.…So this line of code, is going to select each paragraph…and then wrap each paragraph inside a div…whose style attribute is set to be the color red.…
- What is jQuery?
- Using selectors and filters to extract information
- Creating, inserting, and animating page content
- Handling events
- Understanding jQuery statement chaining
- Working with CSS
- Building event handlers
- Animating with jQuery: showing, hiding, and fading page elements
- Working with AJAX
Skill Level Beginner
1. A Quick Introduction to jQuery
2. Working with Page Content
3. Manipulating Page Content
4. jQuery Events
5. Animations and Effects
6. AJAX Operations
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.