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 trialAnnette Martinez
10,737 PointsJquery Code Help Needed
I don't know how to show code on the forum...I need help with Jquery. The challenge is to hide the password hint once the password has > 8 characters.
Edit==> I just figured it out! Even though it was the same code, I guess I needed to reload the browser to get it to work. Problem solved!
6 Answers
qdzfplofsk
22,025 PointsHi Annette - just click on Markdown Cheatsheet below the comment box and it will explain how to put code in comments:
```html
<p>This is code!</p>
```
Annette Martinez
10,737 Points<p>Thanks so much, Aimee!</p>
Annette Martinez
10,737 Points'''js //Hide hints $("form span").hide(); //Find out if password is valid function passwordEvent() { if($(this).val().length > 8) { $(this).next().hide(); } else { $(this).next().show(); } }
$("#password").focus(passwordEvent).keyup(function() {
}); '''
Aimee Ault
29,193 PointsHint for the future when you do need to post code again:
You're using an apostrophe (') there but you should be using a backtick (`) -- it's usually right next to the 1 key on your keyboard :)
Annette Martinez
10,737 PointsI tried posting the code per the instructions, but it didn't format correctly.
qdzfplofsk
22,025 Points //Hide hints $("form span").hide(); //Find out if password is valid function passwordEvent() { if($(this).val().length > 8) { $(this).next().hide(); } else { $(this).next().show(); } }
$("#password").focus(passwordEvent).keyup(function() {
});
```
Annette Martinez
10,737 Points'''html //Hide hints $("form span").hide(); //Find out if password is valid function passwordEvent() { if($(this).val().length > 8) { $(this).next().hide(); } else { $(this).next().show(); } }
$("#password").focus(passwordEvent).keyup(function() {
}); '''
Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherTo put HTML/CSS/JavaScript in a forum post:
hit return to create a new line and type three back tick characters ```
hit return to create another new line and paste your HTML
hit return and add three more back tick characters: ``` The back tick character isn't the same as the single quote -- ' -- mark; the back tick is located on the same key as the ~ on most keyboards.
Also to add correct color highlighting add the name of the language after the back ticks like this: ```CSS. Here's what CSS should look like in a forum post: