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 trial

JavaScript

jQuery Code Challenge - Text Event Inputs - Help Needed, please.

Hello,

I'm stuck on the 2nd part of the challenge. My code seems to invalidate my correct code from the first challenge and I'm not clear on what I'm doing wrong:

$(".hint").hide(); $("text").keydown(function(){ $(this).next().show() };

Any explanation would be greatly appreciated.

Thanks in advance for your help,

Jonathan

3 Answers

$("input").keydown(function(){ $(this).next().show() } );

You needed to select the input elements, and add a closing bracket of the keydown function.

Hope this helps

Mike,

Thanks you so much for your response.

The code makes sense to me. I had tried numerous versions, including your suggestion - all without the closing bracket for the keydown function.

Thanks again for taking the time to reply, I appreciate it.

Jonathan

No problem :-)