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

General Discussion

Build an Interactive Website Form Validation and Manipulation jQuery Utility Methods

http://teamtreehouse.com/library/jquery-utility-methods

Call 'map' on the inputs with the class 'required' and return each of their values and store it in a variable named 'values'.

var $required = $(".required input"); var values = $required.map(function(){ return $(this).val()==""; }); return $.inArray(true, values) != -1;

Please tell me what I'm doing wrong here. I've done the same thing as in the video and it isn't working. It tells me I haven't set the variable 'values' but since I don't know what that means it's not terribly helpful. If possible, please tell me why what I'm doing is wrong because I really am not getting this and just getting past this question isn't really what I'm after here. I really would like to know why things are done the way they are so that I can figure it out for myself in the future.

Thank you.

1 Answer

I wish I could delete posts once I didn't need the answer anymore. Sorry...I figured it out. I'll start looking for other forums before I post my own.