hide drop down field when specific email (@abc.com or @xyz.com) is inputted
I'm building a registration form and I need to h开发者_如何学编程ide a drop down field when a specific email is inputted. So when a user with email id of john*@abc.com* is added the drop will disappear. I hope this makes sense. Thanks.
$("#email").keyup(function(){
$("#dropdown").toggle($(this).val() != "john*@abc.com");
});
http://jsfiddle.net/hunter/hnRxm/
精彩评论