Hello Guys!

I'm sitting here with a form - With a name field, email field and a message field, and I would really like to do some "real-time" validation, so if etc I write an email wrong (or right) - then when I change or focus another element it will validate the email field, and show an X if wrong, and a check mark if it's right.

I'm not very good at javascript or jquery at all

I've tried using this just for testing:

Code JavaScript:
$("#email").change(function() {
	var emailstring = $("#email").val();
 
	if(emailstring.contains('@','.') == 1) {
		return alert('problem');
	} else {
		return alert('no problem');
	}
});

Is there anyone that can help?

Best regards,
Lucas Rolff