JQuery validating email addresses


PHP:
<label class="label" for="email">E-mail: </label>
<input type="text" name="email" id="email" size="48" /><span class="error">please enter a valid e-mail address</span><br />
$regexEmail = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/';
var inputEmail = $(this).val( );
var resultEmail = regexEmail.test(inputEmail);
if(!resultEmail){
$(this).next('.error').css('display', inline');
}else
$(this).next('.error').css('display', 'none');
}
});


CSS:
.error {
display: none;
color: #FF0000;
font-size: 0.7em;
margin: 0px 0px 0px 5px;
}