Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice Dynamic Select Menus!
You have completed Practice Dynamic Select Menus!
Preview
This video shows one solution to solving the challenges.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You can watch my solution and
then go back and try it again.
0:00
Let's see how I approach this.
0:03
So for steps one and two, I used
a querySelector targeting each select
0:06
menu's ID property and
named them animalSelect and breedSelect.
0:11
For step three,
I used a querySelector all and
0:17
targeted all option elements that
have a data breed attribute.
0:20
Which as we can see in index.html,
are only the dog and cat breeds,
0:24
not the hidden ones at the top, perfect.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up