Showing error div isn't working...
Hi! I'm new to jQuery and could use some help.
Basically, I want to show a <div> that displays an error message. I would like it to find the container where there is an <input> of type text and whose name is Username and display the corresponding error div.
My code for this part is shown below:
-
$(".formContainer input[type=text, name='Username']").each(function(){
$(this).parent().find(".error").css("display", "block");
});
I think my problem resides in: input[type=text, name='Username']
...I'm not sure if this is how you properly find an input box of type text and whose name is Username.
Thanks for your help!