views:

19

answers:

1

placing an error after an input box is simple and makes sense... but what if the error relates to a radio group and that group is within a table?

I want the error to show up after the table...

Any idea how to accomplish this?

A: 

You can use .closest() to get the <table> it's in, then place the error .after() that, for example:

$("form").validate({
  errorPlacement: function(error, element) {
    element.closest('table').after(error);
  }
});
Nick Craver
Wow. Okay... I didn't even think to look for the "table". Thank you sir. Now everything looks nice and clean!
dcolumbus