jQuery Validation Tooltip

jquery

#1

When my text input doesn't validate as an email address I want a tooltip to show. The jQuery code below doesn't work. Can anyone help me with this?

Here is the code:

<script language="javascript" type="text/javascript">
	 
$(document).ready(function() {

$('.email').focusout(function(){

              $('.email').filter(function(){
              var emil=$('.email').val();
              var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
            if( !emailReg.test( emil ) ) {	
			$(this).tooltip({
  content: "<div style=\"position: relative; top: -20px; right: -500px; background-color: #444; padding: 6px; width: 180px; height: 60px; color: #fff;\">Please enter a valid email address.</div>"});
                }
                })
            });

});

</script>


<input type="email" class="ui-tooltip-content email" id="tooltip-1" name="tooltip-1" size="61">

#2

@makamo66
Please display the FULL HTML-code you are using....