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
Jay Laiche
8,612 PointsjQuery Plugins - Andrew's validEmail plugin still acts like previous isValidEmail function
I'm currently on stage 3 of the jQuery course, "jQuery Plugins". I just completed the video where we used Andrew's validEmail plugin from Github. I followed everything exactly as he did and deleted the old function we produced that validated the email when "@" was indexed.
As I refresh the page and try the e-mail form, however, the validation is working exactly the same. How can this be? I can simply add an "@" symbol to the input field with nothing else, and the color of the marker to the right goes green. Since I deleted all my old functions that we wrote, this just seems very peculiar to me. Made sure the files were saved, refreshed the browser multiple times, same thing...
Am I doing something wrong on my end, or is it something with the plugin?
$("#email").validEmail({on:"keyup", success:function(){
$(this).next().removeClass("error").addClass("valid");
}, failure: function(){
$(this).next().removeClass("valid").addClass("error");
}});
1 Answer
Jay Laiche
8,612 PointsFigured it out: I failed hard and was viewing an earlier version of contact.html from my downloads folder. My bad!
While I'm on the subject, is there a way to delete forum posts entirely? Was looking to delete this but couldn't figure out how.