If you only want one balloon, then try something like this code. Only 
problem is that if the error changes while the user edits the inputs, the 
balloon won't change. You might be able to solve this with some function 
that updates the balloon on keyup events, or something similar.

$(function() {
 $(":checkbox,:text,:radio,:password,:file,textarea").focus(function(){
  $("#balao").hide();
  $("#setabox").empty();
  var sCont = $(this).next('div').children('label').contents()
  if(sCont.length) {
   $("#setabox").append(sCont);
   var bplace = $(this).offset();
   bplace.left += $(this).width();
   bplace.top += Math.round($(this).height()/2)-23;
   $("#balao").css(bplace);
   $("#balao").fadeIn("fast",function(){});
  }
 });

 $("#fteste").validate({
  rules:{
   T1:{ required: true, email:true },
   S1:{ required: true }
  }, messages:{
   T1: { required: "Enter a e-mail!", email: "Enter a valid e-mail!" },
   S1: { required: "Provide a <b>text</b>" }
  },
  errorPlacement:function(error, element){
   error.appendTo( $('<div 
style="display:none"></div>').appendTo(element.parent("p")) );
  }
 });
});


----- Original Message ----- 
From: "Alexsandro_xpt" <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Saturday, March 08, 2008 2:38 PM
Subject: [jQuery] Re: neewbe help, Bassistance Validation Plugin


>
> Thank you for atencion!
>
> Good say about inputs onfocus events. I will try that.
>
> But about "use the errorPlacement option to put the error messages in
> hidden balloons belonging to the respective fields"
> I wish using only one hidden balloons, in last case use several hidden
> balloons.
>
> The interesting is get erro messages for each focus input invalid.
>
> Have you one idea?
>
>
> Thank you

Reply via email to