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] For this challenge you needed to write jQuery code to let the user show and hide different product categories. You can see just as a reminder this is what we were implementing. So let's take a look at my solution and again remember it's okay if your solution is different from mine. So here in the editor I have opened up the index.html for the finished version of HPlusSport. And let's go ahead and scroll down. Remember that in the product section, let's get down there, each one of these H2 tags contains the product-name and it also has a data attribute that indicates the type of product. So let's take a look at my script. First I needed to add a div to contain the checkbox controls that I used to show and hide the elements. So you can see here I've got a div for that and a form and inside the form is another div and then I have a whole bunch of controls. And I've got inputs and labels and so on. So let's go ahead and scroll up. Oh and before that I do that though, notice…
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.