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.
Solution
- [Narrator] How did you do? Did you get it to work? Let's take a look at how I solved this particular challenge. Now one of the things I want to point out here is that it's not important that you got the same answer that I did, because there's many ways you can solve problems like this using jQuery. I'm just going to show you how I chose to solve the problem, and your solution may have been a little bit different. Go ahead and open the finished version of the index.html page and we're gonna go through my code. Right here at the top I started off by including the jQuery library. Now I didn't do that in the start version so hopefully you didn't stumble over that too much. Then I have three lines of jQuery code that dynamically change the background of each of the product names. Before we go through that if you scroll down to the product section, and remember that each one of the product names was inside a heading two tag with a CSS class that has product-name on it, and each of these…
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
-
-
-
-
-
-