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.
Basic selectors - jQuery Tutorial
From the course: jQuery Essential Training
Basic selectors
- [Instructor] Basic jQuery selectors work by using a CSS-like syntax to select content from the page. Let's take a look at the syntax for each of these, and then we'll see how they work in our example exercise. To select all the elements in a page with a particular tagName, I simply pass the name of the tag to the jQuery function, which will select all of those elements. Similarly, I can pass an identifier of a specific element, and jQuery will select the element with that ID attribute that has the same name as the identifier. I can also select elements that have a particular class name by passing in the className proceeded by a period, just like you would define it in CSS. I can get a little more fancy by specifying tags that have a particular className by giving the name of the tag, followed by a period, and then the name of the class, just like in CSS. I can get even more fancy than that. I can say get me the element that has a specific tag type and has an ID and a class of the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Overview of selectors and filters1m 57s
-
(Locked)
Basic selectors4m 27s
-
(Locked)
Basic filters5m 59s
-
(Locked)
Advanced selectors5m 3s
-
(Locked)
Attribute filters4m 44s
-
(Locked)
Advanced filters6m 48s
-
(Locked)
Traversing documents with jQuery9m 57s
-
(Locked)
jQuery statement chaining1m 18s
-
(Locked)
Programming challenge2m 43s
-
(Locked)
Solution2m 32s
-
-
-
-
-
-