Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJamie Bradley
7,148 PointsjQuery: Dropdown menu
"Modify the $button click code so it now performs the redirect when the $select is changed." This is the code I used, which is clearly wrong :( What am I missing, please?
$button.click(function(){ window.location=$select.change(function.val(); });
3 Answers
Jacob Miller
12,466 PointsThey want the redirect to happen when $select
is changed, so you need to replace $button.click(
with $select.change(
.
$select.change(function(){
window.location = $select.val();
});
Jeremy Woodbridge
25,278 PointsTook me a few to minutes but I got past the Error on Task 1 problem.
- First remove the code on line 27 entirely
2.Change line 29 to this $select.change(function(){
If this does not work please respond with the error and your code so I can see what may be the problem
Lee Miller
5,266 Pointsto solve the problem of task one no longer passes, you must remove the line you changed in Task one
Marco Angelo
Courses Plus Student 2,003 PointsMarco Angelo
Courses Plus Student 2,003 Pointssays Task one is no longer passing
Michelle Pepe
Courses Plus Student 6,125 PointsMichelle Pepe
Courses Plus Student 6,125 Pointssays Task one is no longer passing