From the course: jQuery Essential Training

Unlock the full course today

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

Advanced selectors

Advanced selectors - jQuery Tutorial

From the course: jQuery Essential Training

Start my 1-month free trial

Advanced selectors

- [Instructor] Now that we've seen some of the basic selectors and filters, in this example I'm going to demonstrate some of the more advanced selectors that you can use in jQuery. Let's open up the file hier combo underscore start in the Editor. Now, if you've ever worked with some of the more advanced CSS selectors, such as the parent-child or descendants selectors, these are going to look very familiar to you because they use the same syntax. Let's begin with the child selector. Alright, div angle bracket p and then dot css and then we'll use the same trick as we used earlier. The child selector is indicated by the angle bracket and what this basically means is select this tag but only if it is an immediate child of this kind of tag. So this expression means give me the paragraph tags that are immediate children of a div element. And, if we look down at the content of our example document you can see that these paragraphs are immediate children of this div and then these paragraphs…

Contents