I have a span
that is generated every time a user focus out
in the textbox.
This span
will contain emails so I want to validate every time a user enters an email. How can I apply a validation in jquery throught this span?
Below is my code
$('#tags input').on('focusout',function(){
var i = 0;
var txt = $.trim( this.value );
if(txt) {
$(this).before('<span class="tag" id="">'+txt+'</span>');
}
this.value = "";
});