From the course: jQuery Essential Training
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Basic filters - jQuery Tutorial
From the course: jQuery Essential Training
Basic filters
- [Instructor] jQuery filters are used in conjunction with selectors in order to further refine a result set that comes back from a selector expression. In this chapter, we'll look at filters and then we'll see how they work in some example exercises. So let's look at the basic filters available in jQuery. I can use the first and last filters to select the first or the last instance of a given selector type. The filter is specified using a colon before the name of the filter. Similarly, I can use the even or odd filters to select only even or odd-numbered items. I can use expressions like greater than, less than, or equal to. So I can use these filters, for example, to select elements that are at or before or after a specific index. I can also specify that I only want to filter for items that are currently in the process of being animated. And this could be useful, for example, if you want to stop all the animations on a page. There's a filter to get the element that currently has the…
Contents
-
-
-
-
-
Introduction to selectors and filters1m 58s
-
(Locked)
Basic selectors5m 39s
-
(Locked)
Basic filters6m 15s
-
(Locked)
Advanced selectors5m 41s
-
(Locked)
Attribute filters4m 55s
-
(Locked)
Advanced filters7m 46s
-
(Locked)
Traversing web page elements9m 10s
-
(Locked)
Statement chaining1m 30s
-
(Locked)
Challenge: Selectors3m 30s
-
(Locked)
Solution: Selectors1m 59s
-
-
-
-
-
-
-
-