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.
jQuery statement chaining - jQuery Tutorial
From the course: jQuery Essential Training
jQuery statement chaining
- [Joe] I want to point out one of jQuery's more interesting features and that is its ability to chain multiple functions together. This is called statement chaining. It basically allows you to perform several operations on a result set in just one line of code. Up until now, you've seen a lot of code that looks like this. A jQuery selector statement followed by a function call that operates on the result set that comes back. However, I can chain multiple function calls together, one after another to operate on the result set as you see here. This is called a statement chain. These functions will get executed in order, starting on the left and going across to the right. So the selector will execute, then the results that will come back and I can do multiple operations on those objects. I can assign CSS, I can manipulate the content, I can turn events on and off. And the reason why this makes jQuery so powerful is that it allows you to perform multiple operations on one result set…
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
-
-
-
-
-
-