Good morning, I have a doubt.
I have a function that adds a click the User, the side of my input
Plus this gives an error. I wanted just once even if adicionace a person clicks the button several times the action. Do you have a scan after input if not add another
My code.
//th = Name of the input that will add, at the low <SPAN>
if(d.length == 0){
$(th).after('<SPAN class="erro">'+txt+'</SPAN>');
this.focus();
return false;
}
I would be very grateful for the help. 🙂
You should search for
span.errorfirst with$.find, and add it only if it isn’t there already: