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 trialAlan Sea
6,781 PointsWhy won't my "hints" hide? Console throws no errors...?
Won't even hide on page load, and that's a fairly straightforward call...?
3 Answers
Billy Bellchambers
21,689 PointsIf your still struggling to find the correction look below.
//Hide hints
$("form span").hide();
//When event occurs on password input
$("#password").focus(function() {
//Find out if password is valid
if($(this).val().length > 8) {
//If yes, hide hint
$(this).next().hide();
}
//If no, show hint
else {
$(this).next().show(); //you had a missing closing bracket on '$(this)'
}
});
This should now work
Alan Sea
6,781 PointsThanks for the heads up...
Billy Bellchambers
21,689 PointsYour welcome happy coding
Alan Sea
6,781 PointsSadly, I spoke too soon--doesn't seem to have fixed the issue.
Uros Tadic
5,167 PointsYou need to also refresh the page you are looking, not only to save the js file. I think that is your problem :D
Billy Bellchambers
21,689 PointsBilly Bellchambers
21,689 PointsCheck your else function I think you might be missing a closing ) in there