jQuery Validation Plugin - success:function() ISSUE

jQuery Validation Plugin - success:function() ISSUE

Hi everyone.
I really need som help on this. I will do my best to explain the issue I'm on.

I use the great Validation Plugin from Jörn Zaefferer to validate my Forms. Everything is just fine, but since I tried to implement the "success:function(label) {}" thing I can`t get it right.

The worst part is that I'm doing the basic of the documentation:

  1. success: function(em) {
  2. em.text("Ok!").addClass("valid");
  3. },

The question is that the "transformation" of the label [em in my case] is doing fine, but the image of the little nice blue check icon doesn't locate next to the input, it goes down:



As you see the error label or em or whatever is correctly shown, but when it becomes "valid"



It just goes DOWN !!!!!

I leave you guys my validate() and my CSS codes ...
The funny thing is that with the Firebug, it shows me on the generation of the valid label, a "display:block" attribute, and if I block it on Firebug the label goes where it belongs, see:



Here is the jQuery code:

  1. $("#frmBusquedaPropia").validate({
  2. debug: true,
  3. errorElement: "em",
  4. success: function(em) {                            // Here is my problem ??
  5. em.text("Ok!").addClass("valid");        // At least is with this 
  6. },
  7. errorPlacement: function(error, element) {
  8. error.insertAfter(element);
  9. },
  10. submitHandler: function(form) {
  11. $.ajax({
  12. type: "POST",
  13. url: $("#"+form.id).attr("action"),
  14. data: $("#"+form.id).serialize(),
  15. success: function(data) {
  16. $("#searchResultsPropio").empty().html(data);
  17. },
  18. error: function(e) {
  19. if (e.description == null) {
  20. alert(e.message);  
  21. } else {
  22. alert(e.description);
  23. }
  24. }
  25. });
  26. $("*[generated='true']").remove();
  27. },
  28. rules: {
  29.                         // My rules are here
  30. },
  31.                 messages: {
  32.                         // My custom messages are here
  33.                 }
  34. });

And here is the CSS:

  1. em.error {
  2. background:#FEF1EC url("../images/gen/unchecked.gif") no-repeat 5px 4px;
  3. border:1px dotted;
  4. color:#CD0A0A;
  5. font-size:1em;
  6. margin-left:5px;
  7. padding:5px 18px;
  8. position:absolute;
  9. text-align:center;
  10. width:300px;
  11. }

  12. em.valid {
  13. background: url('../images/gen/checked.gif') no-repeat 2px 6px;
  14. border:none;
  15. color:#222222;
  16. height:16px;
  17. width:16px;
  18. position: absolute;
  19. padding:6px 18px;
  20. }

  21. input.error {
  22. background-color:#FEF1EC;
  23. border:2px dotted #CD0A0A;
  24. }

So guys, what possible could be wrong besides my brain ???
I really need a clue, I accept working code to :-P
Is just a CSS positioning issue ? Or display ? If you need I'll post you my HTML too, but is just that, pure HTML ...
Thanks in advance for the help.