How to place jQuery Validate error message after the label?
I am using jQuery Validate and need to place the error message AFTER the label element. Currently, it's just inserting it after the input and before the element.
Can someone tell me how do this?
<td>
<input type="text" id="name" name="name" class="text">
<label for="name">Name</label>
</td>
errorElement: "div",
errorPlacement: function(error, element) {
开发者_如何学编程 $(element).after(error);
},
This may help
$(element).next().after(error);
Demo : http://jsfiddle.net/sparkup/behLgebw/
精彩评论