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!
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

Aidan Gould
1,926 PointsHelp with Simple Email Validation Plugin Code Challenge
Hi Everyone, I'm having a little trouble with the third challenge in Build an Interactive Website jQuery Plugins Simple Email Validation Plugin. I'm sure it's something inane, but I can't figure it out. The challenge is "On the next line select the "textarea" call "validEmail" and pass in the parameters of "on" set to "keyup", and "success" and "failure" set to empty anonymous functions."
I've tried all of these (seperately, of course)
$("textarea").validEmail({on:keyup, success:function(){}, failure:function(){}});
$(".textarea").validEmail({on:keyup, success:function(){}, failure:function(){}});
$("#textarea").validEmail({on:keyup, success:function(){}, failure:function(){}});
with no luck. (Anyone who wants to point me to a reminder on how to specify what I'm calling something on is also welcome to, I have a very hard time keeping it straight.)
Thanks in advance for any advice.
Best, A
12 Answers

Andrew Chalkley
Treehouse Guest TeacherPut the keyup
in quotes :)

Aidan Gould
1,926 PointsOh no! It's right there in the video too. Working perfectly now.
Thanks for the help. I appreciate the energy in the videos and that you pay so much attention to questions in the forum.

Andrew Chalkley
Treehouse Guest TeacherNo worries. Hit us up if you need help or any further explaination.

Brent McCarthy
2,736 PointsOkay, I entered ....
("textarea").validEmail({on:"keyup", success:function(){}, failure:function(){}});
and received "Bummer! You didn't call 'validEmail' on the selected textarea". Is it something obvious that I am missing?

Andrew Chalkley
Treehouse Guest TeacherIt looks like you missed the $
at the beginning.

Brent McCarthy
2,736 PointsDoh! Had a feeling it was something obvious.

Brent McCarthy
2,736 PointsDoesn't get more obvious than that :-)

Brian Chewning
7,270 PointsI have got this so far...
$("textarea").validEmail({on:"keyup", success:function(){}, failure:function(){}});
what am I missing?

Andrew Chalkley
Treehouse Guest TeacherThat does look right. What OS are you on?

Brian Chewning
7,270 Pointsi have windows vista, why?

Andrew Chalkley
Treehouse Guest TeacherSome times Windows inserts special characters at the ends of lines when you hit return or copy and paste which can cause the engine to bork.
Try typing it in character for character and see if it happens again. If it does tell me the error message you get.

Brian Chewning
7,270 PointsI thyped it out and got the error message "Bummer! You didn't call 'validEmail' on the selected text area.

Andrew Chalkley
Treehouse Guest TeacherThis is the code I have:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="validEmail.js"></script>
<script>
var isValid = $("input").validEmail();
$("textarea").validEmail({on:"keyup", success:function(){}, failure:function(){}});
</script>
It works.

Brian Chewning
7,270 Pointsgot it. did not have it in the script tag. thanks for the help.

Andrew Chalkley
Treehouse Guest TeacherContext is key :)

Ed Young
14,340 PointsI have entered:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="validEmail.js"></script>
<script type="text/javascript">
var isValid = $("input").validEmail();
$("textarea").validEmail({on:"keyup", success: function() {}, failure:() {}});
</script>
I get the response, "Oops! It looks like Task 2 is no longer passing."
Please advise. Thanks much! (Using chrome on a Mac with Mavericks.)
I found the problem - spacing is critical. Thanks!

Ed Young
14,340 PointsThanks! The dangers of coding late at night! :-)

Andrew Chalkley
Treehouse Guest TeacherAn extra pair of eyes always helps.

Ed Young
14,340 PointsThanks! The dangers of coding late at night! :-)