Introducing the Practice2:30 with Treasure Porth
This video introduces the challenge that you'll be working to complete.
[MUSIC] 0:00 Hey, it's Treasure. 0:09 This session is designed to give you additional practice traversing a list and 0:10 looping through a jQuery collection. 0:14 Practice is a great way to help solidify what you've just learned and 0:17 to start to get that syntax down. 0:21 So let's do it. 0:23 This practice session assumes that you've completed the jQuery Basics course. 0:25 You can find a link to the course videos in the teacher's notes below, 0:29 as well as links to documentation that will help you review what you've learned. 0:33 To get started, all you need to do is open Workspaces, 0:37 then the index.html and app.js files. 0:41 If you wanna complete these challenges in your own text editor, 0:44 you can download the files below. 0:47 Follow the commented steps to complete each challenge. 0:49 You'll begin with a list of links and add some enhancements to the list. 0:54 When you're finished, the list should look like this. 0:58 The first challenge asks you to traverse the list and 1:01 add a Featured tag to the second list item. 1:04 To accomplish this, you'll need to create and 1:07 append a new HTML element to the list item. 1:10 There are a couple of classes in this CSS file that have been predefined. 1:13 As part of the challenge, 1:21 you'll add one of these classes to the element you've created. 1:22 The second challenge asks you to traverse to the last item in the list and 1:27 add a predefined class to it. 1:31 Third, you'll select each link on the page and 1:34 add an attribute that will cause the link to open up in a new tab. 1:37 This might require reviewing the course. 1:44 Remember, you can find links and other resources in the teacher's notes below. 1:46 For the fourth challenge, you'll loop through each anchor tag and 1:52 log out the index, as well as the text of each anchor tag. 1:56 Finally, you'll rewrite your loop using the this keyword. 2:03 Have fun, and 2:07 don't worry too much if you can't recall everything you've just learned. 2:08 You can consult the teacher's notes for help and resources. 2:11 And you may need to Google or review the videos to recall method names or 2:15 remember syntax. 2:19 Totally fine. 2:20 As always, just keep practicing. 2:21 After you've done your best to complete the challenges, watch the next video and 2:24 I'll walk you through my solutions. 2:28
You need to sign up for Treehouse in order to download course files.Sign up